fs/notify/fanotify/fanotify_user.c: fix FAN_MARK_FLUSH flag checking
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Wed, 4 Jun 2014 23:05:43 +0000 (16:05 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 4 Jun 2014 23:53:52 +0000 (16:53 -0700)
commitcc299a98eb13a9853675a9cbb90b30b4011e1406
treea1bcf01204e5753d1d2016e0ff9885b9f2c1a193
parentefa8f7e5d7bc2a6f1d1f9b43f9514d02f00b9cb1
fs/notify/fanotify/fanotify_user.c: fix FAN_MARK_FLUSH flag checking

If fanotify_mark is called with illegal value of arguments flags and
marks it usually returns EINVAL.

When fanotify_mark is called with FAN_MARK_FLUSH the argument flags is
not checked for irrelevant flags like FAN_MARK_IGNORED_MASK.

The patch removes this inconsistency.

If an irrelevant flag is set error EINVAL is returned.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/notify/fanotify/fanotify_user.c