]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/notify/fanotify/fanotify.c
Merge branch 'for-next' of git://git.infradead.org/users/eparis/notify
[karo-tx-linux.git] / fs / notify / fanotify / fanotify.c
index a50636025364214176fe7cec0cb80757ddc27171..0c2f9122b262da54392c8ed90a5a9d94ea22719c 100644 (file)
@@ -18,6 +18,12 @@ static bool should_merge(struct fsnotify_event *old, struct fsnotify_event *new)
            old->tgid == new->tgid) {
                switch (old->data_type) {
                case (FSNOTIFY_EVENT_PATH):
+#ifdef CONFIG_FANOTIFY_ACCESS_PERMISSIONS
+                       /* dont merge two permission events */
+                       if ((old->mask & FAN_ALL_PERM_EVENTS) &&
+                           (new->mask & FAN_ALL_PERM_EVENTS))
+                               return false;
+#endif
                        if ((old->path.mnt == new->path.mnt) &&
                            (old->path.dentry == new->path.dentry))
                                return true;