]> git.karo-electronics.de Git - karo-tx-linux.git/commit
fanotify: FAN_MARK_FLUSH: avoid having to provide a fake/invalid fd and path
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Wed, 14 May 2014 00:01:20 +0000 (10:01 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 14 May 2014 00:01:20 +0000 (10:01 +1000)
commit400fd37231a416175bac0966c77f08f1a1a69116
treec92072a8863f1cc0be4522ff4e3066151e1a1f66
parent8b35d51f1c7f1edff7aaa9fe5ee5066354790b33
fanotify: FAN_MARK_FLUSH: avoid having to provide a fake/invalid fd and path

Originally from Tvrtko Ursulin (https://lkml.org/lkml/2011/1/12/112)

Avoid having to provide a fake/invalid fd and path when flushing marks

Currently for a group to flush marks it has set it needs to provide a fake
or invalid (but resolvable) file descriptor and path when calling
fanotify_mark.  This patch pulls the flush handling a bit up so file
descriptor and path are completely ignored when flushing.

I reworked the patch to be applicable again (the signature of fanotify_mark
has changed since Tvrtko's work).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Tvrtko Ursulin <tvrtko.ursulin@onelan.co.uk>
Reviewed-by: Jan Kara <jack@suse.cz>
Acked-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/notify/fanotify/fanotify_user.c