]> git.baikalelectronics.ru Git - kernel.git/commit
fanotify: remove useless bypass_perm check
authorJan Kara <jack@suse.cz>
Thu, 3 Apr 2014 21:46:32 +0000 (14:46 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 3 Apr 2014 23:20:51 +0000 (16:20 -0700)
commit1683f751fac6997030dee1927c90921c24c12077
tree90bf0ad43189a553f47f2c27b9345ea8c7de2bdf
parent985e1b932ef2f549e9d6ac3362e7da4355b6bc58
fanotify: remove useless bypass_perm check

The prepare_for_access_response() function checks whether
group->fanotify_data.bypass_perm is set.  However this test can never be
true because prepare_for_access_response() is called only from
fanotify_read() which means fanotify group is alive with an active fd
while bypass_perm is set from fanotify_release() when all file
descriptors pointing to the group are closed and the group is going
away.

Signed-off-by: Jan Kara <jack@suse.cz>
Cc: Eric Paris <eparis@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/notify/fanotify/fanotify_user.c