summaryrefslogtreecommitdiffstats
path: root/fs/notify/fanotify/fanotify.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-02 20:12:54 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-02 20:12:54 -0800
commit17b02809cfa77abcab155ce3afbb1467e7f0744f (patch)
tree4bb7b08fa29e73fb29a8e56fec766643b1eaa82e /fs/notify/fanotify/fanotify.c
parent9cd02bd876d3b1a5a93f0c9376f578bde03a6b26 (diff)
parent0414855fdc4a40da05221fc6062cccbc0c30f169 (diff)
downloadop-kernel-dev-17b02809cfa77abcab155ce3afbb1467e7f0744f.zip
op-kernel-dev-17b02809cfa77abcab155ce3afbb1467e7f0744f.tar.gz
Merge 3.14-rc5 into staging-next
We want those fixes in here
Diffstat (limited to 'fs/notify/fanotify/fanotify.c')
-rw-r--r--fs/notify/fanotify/fanotify.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/notify/fanotify/fanotify.c b/fs/notify/fanotify/fanotify.c
index 0e792f5..dc638f7 100644
--- a/fs/notify/fanotify/fanotify.c
+++ b/fs/notify/fanotify/fanotify.c
@@ -147,7 +147,7 @@ static int fanotify_handle_event(struct fsnotify_group *group,
struct fsnotify_mark *inode_mark,
struct fsnotify_mark *fanotify_mark,
u32 mask, void *data, int data_type,
- const unsigned char *file_name)
+ const unsigned char *file_name, u32 cookie)
{
int ret = 0;
struct fanotify_event_info *event;
@@ -192,10 +192,12 @@ static int fanotify_handle_event(struct fsnotify_group *group,
ret = fsnotify_add_notify_event(group, fsn_event, fanotify_merge);
if (ret) {
- BUG_ON(mask & FAN_ALL_PERM_EVENTS);
+ /* Permission events shouldn't be merged */
+ BUG_ON(ret == 1 && mask & FAN_ALL_PERM_EVENTS);
/* Our event wasn't used in the end. Free it. */
fsnotify_destroy_event(group, fsn_event);
- ret = 0;
+
+ return 0;
}
#ifdef CONFIG_FANOTIFY_ACCESS_PERMISSIONS
OpenPOWER on IntegriCloud