Commit d4c7cf6cffb1bc711a833b5e304ba5bcfe76398b
Committed by
Linus Torvalds
1 parent
0a8dd2db57
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
fanotify: create FAN_ACCESS event for readdir
Before the patch, read creates FAN_ACCESS_PERM and FAN_ACCESS events, readdir creates only FAN_ACCESS_PERM events. This is inconsistent. After the patch, readdir creates FAN_ACCESS_PERM and FAN_ACCESS events. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Jan Kara <jack@suse.cz> Cc: Eric Paris <eparis@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 2 additions and 0 deletions Side-by-side Diff
fs/readdir.c
... | ... | @@ -13,6 +13,7 @@ |
13 | 13 | #include <linux/stat.h> |
14 | 14 | #include <linux/file.h> |
15 | 15 | #include <linux/fs.h> |
16 | +#include <linux/fsnotify.h> | |
16 | 17 | #include <linux/dirent.h> |
17 | 18 | #include <linux/security.h> |
18 | 19 | #include <linux/syscalls.h> |
... | ... | @@ -40,6 +41,7 @@ |
40 | 41 | ctx->pos = file->f_pos; |
41 | 42 | res = file->f_op->iterate(file, ctx); |
42 | 43 | file->f_pos = ctx->pos; |
44 | + fsnotify_access(file); | |
43 | 45 | file_accessed(file); |
44 | 46 | } |
45 | 47 | mutex_unlock(&inode->i_mutex); |