diff options
Diffstat (limited to 'fs/notify')
-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, | |||
566 | 566 | ||
567 | /* don't allow invalid bits: we don't want flags set */ | 567 | /* don't allow invalid bits: we don't want flags set */ |
568 | mask = inotify_arg_to_mask(arg); | 568 | mask = inotify_arg_to_mask(arg); |
569 | if (unlikely(!mask)) | 569 | if (unlikely(!(mask & IN_ALL_EVENTS))) |
570 | return -EINVAL; | 570 | return -EINVAL; |
571 | 571 | ||
572 | fsn_mark = fsnotify_find_inode_mark(group, inode); | 572 | fsn_mark = fsnotify_find_inode_mark(group, inode); |
@@ -624,7 +624,7 @@ static int inotify_new_watch(struct fsnotify_group *group, | |||
624 | 624 | ||
625 | /* don't allow invalid bits: we don't want flags set */ | 625 | /* don't allow invalid bits: we don't want flags set */ |
626 | mask = inotify_arg_to_mask(arg); | 626 | mask = inotify_arg_to_mask(arg); |
627 | if (unlikely(!mask)) | 627 | if (unlikely(!(mask & IN_ALL_EVENTS))) |
628 | return -EINVAL; | 628 | return -EINVAL; |
629 | 629 | ||
630 | tmp_i_mark = kmem_cache_alloc(inotify_inode_mark_cachep, GFP_KERNEL); | 630 | tmp_i_mark = kmem_cache_alloc(inotify_inode_mark_cachep, GFP_KERNEL); |