diff options
author | Eric Paris <eparis@redhat.com> | 2010-11-09 11:45:15 -0500 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2010-11-29 14:51:25 -0500 |
commit | 67e1a98b2251ed9de8f332524cb020f7ad257cc2 (patch) | |
tree | a533eba5502972bdd916d6a44bcb0c14b900c091 /fs | |
parent | d852c6baf825631e2560893acd5e04028cce0871 (diff) |
fanotify: remove code duplication in mask tests
The generic code in send_to_group() checks if a given mask is
appropriate for the given group. There is no need to duplicate this
code in fanotify.
Reported-by: Tvrtko Ursulin <tvrtko.ursulin@sophos.com>
Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/notify/fanotify/fanotify.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/notify/fanotify/fanotify.c b/fs/notify/fanotify/fanotify.c index f35794b97e8e..d53d4f516a65 100644 --- a/fs/notify/fanotify/fanotify.c +++ b/fs/notify/fanotify/fanotify.c @@ -204,10 +204,13 @@ static bool fanotify_should_send_event(struct fsnotify_group *group, (marks_ignored_mask & FS_ISDIR)) return false; - if (event_mask & marks_mask & ~marks_ignored_mask) - return true; - - return false; + /* + * It might seem logical to check: + * if (event_mask & marks_mask & ~marks_ignored_mask) + * return true; + * but we we know this was true from the caller so just return true. + */ + return true; } static void fanotify_free_group_priv(struct fsnotify_group *group) |