diff options
author | Jerome Marchand <jmarchan@redhat.com> | 2010-07-28 16:18:37 +0200 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2010-07-28 16:18:49 +0200 |
commit | 44b350fc23e36e95c8e042b7ded66217ea2b9d72 (patch) | |
tree | 590975f1e8690e5555f7c8b45f26ec7fddccddb8 /fs | |
parent | inotify: force inotify and fsnotify use same bits (diff) | |
download | linux-44b350fc23e36e95c8e042b7ded66217ea2b9d72.tar.xz linux-44b350fc23e36e95c8e042b7ded66217ea2b9d72.zip |
inotify: Fix mask checks
The mask checks in inotify_update_existing_watch() and
inotify_new_watch() are useless because inotify_arg_to_mask() sets
FS_IN_IGNORED and FS_EVENT_ON_CHILD bits anyway.
Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/notify/inotify/inotify_user.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c index c8203ce28ab7..7dc940c869b6 100644 --- a/fs/notify/inotify/inotify_user.c +++ b/fs/notify/inotify/inotify_user.c @@ -566,7 +566,7 @@ static int inotify_update_existing_watch(struct fsnotify_group *group, /* don't allow invalid bits: we don't want flags set */ mask = inotify_arg_to_mask(arg); - if (unlikely(!mask)) + if (unlikely(!(mask & IN_ALL_EVENTS))) return -EINVAL; fsn_mark = fsnotify_find_inode_mark(group, inode); @@ -624,7 +624,7 @@ static int inotify_new_watch(struct fsnotify_group *group, /* don't allow invalid bits: we don't want flags set */ mask = inotify_arg_to_mask(arg); - if (unlikely(!mask)) + if (unlikely(!(mask & IN_ALL_EVENTS))) return -EINVAL; tmp_i_mark = kmem_cache_alloc(inotify_inode_mark_cachep, GFP_KERNEL); |