|
@@ -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;
|