diff options
Diffstat (limited to 'fs/notify/fanotify/fanotify.c')
| -rw-r--r-- | fs/notify/fanotify/fanotify.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/notify/fanotify/fanotify.c b/fs/notify/fanotify/fanotify.c index f35794b97e8e..0c2f9122b262 100644 --- a/fs/notify/fanotify/fanotify.c +++ b/fs/notify/fanotify/fanotify.c | |||
| @@ -18,9 +18,16 @@ static bool should_merge(struct fsnotify_event *old, struct fsnotify_event *new) | |||
| 18 | old->tgid == new->tgid) { | 18 | old->tgid == new->tgid) { |
| 19 | switch (old->data_type) { | 19 | switch (old->data_type) { |
| 20 | case (FSNOTIFY_EVENT_PATH): | 20 | case (FSNOTIFY_EVENT_PATH): |
| 21 | #ifdef CONFIG_FANOTIFY_ACCESS_PERMISSIONS | ||
| 22 | /* dont merge two permission events */ | ||
| 23 | if ((old->mask & FAN_ALL_PERM_EVENTS) && | ||
| 24 | (new->mask & FAN_ALL_PERM_EVENTS)) | ||
| 25 | return false; | ||
| 26 | #endif | ||
| 21 | if ((old->path.mnt == new->path.mnt) && | 27 | if ((old->path.mnt == new->path.mnt) && |
| 22 | (old->path.dentry == new->path.dentry)) | 28 | (old->path.dentry == new->path.dentry)) |
| 23 | return true; | 29 | return true; |
| 30 | break; | ||
| 24 | case (FSNOTIFY_EVENT_NONE): | 31 | case (FSNOTIFY_EVENT_NONE): |
| 25 | return true; | 32 | return true; |
| 26 | default: | 33 | default: |
