diff options
Diffstat (limited to 'fs/notify/fanotify')
-rw-r--r-- | fs/notify/fanotify/fanotify.c | 12 | ||||
-rw-r--r-- | fs/notify/fanotify/fanotify_user.c | 1 |
2 files changed, 5 insertions, 8 deletions
diff --git a/fs/notify/fanotify/fanotify.c b/fs/notify/fanotify/fanotify.c index bbc175d4213d..e5f7e47de68e 100644 --- a/fs/notify/fanotify/fanotify.c +++ b/fs/notify/fanotify/fanotify.c @@ -6,6 +6,7 @@ #include <linux/kernel.h> /* UINT_MAX */ #include <linux/mount.h> #include <linux/sched.h> +#include <linux/sched/user.h> #include <linux/types.h> #include <linux/wait.h> @@ -31,7 +32,6 @@ static bool should_merge(struct fsnotify_event *old_fsn, static int fanotify_merge(struct list_head *list, struct fsnotify_event *event) { struct fsnotify_event *test_event; - bool do_merge = false; pr_debug("%s: list=%p event=%p\n", __func__, list, event); @@ -47,16 +47,12 @@ static int fanotify_merge(struct list_head *list, struct fsnotify_event *event) list_for_each_entry_reverse(test_event, list, list) { if (should_merge(test_event, event)) { - do_merge = true; - break; + test_event->mask |= event->mask; + return 1; } } - if (!do_merge) - return 0; - - test_event->mask |= event->mask; - return 1; + return 0; } #ifdef CONFIG_FANOTIFY_ACCESS_PERMISSIONS diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c index 7ebfca6a1427..2b37f2785834 100644 --- a/fs/notify/fanotify/fanotify_user.c +++ b/fs/notify/fanotify/fanotify_user.c @@ -14,6 +14,7 @@ #include <linux/types.h> #include <linux/uaccess.h> #include <linux/compat.h> +#include <linux/sched/signal.h> #include <asm/ioctls.h> |