diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2014-06-04 19:05:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-04 19:53:52 -0400 |
commit | d4c7cf6cffb1bc711a833b5e304ba5bcfe76398b (patch) | |
tree | 218c82ae6734a58a0b56c9f298e2e4cabb1e55ca | |
parent | 0a8dd2db579f7a0ac7033d6b857c3d5dbaa77563 (diff) |
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>
-rw-r--r-- | fs/readdir.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/readdir.c b/fs/readdir.c index 5b53d995cae6..33fd92208cb7 100644 --- a/fs/readdir.c +++ b/fs/readdir.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/stat.h> | 13 | #include <linux/stat.h> |
14 | #include <linux/file.h> | 14 | #include <linux/file.h> |
15 | #include <linux/fs.h> | 15 | #include <linux/fs.h> |
16 | #include <linux/fsnotify.h> | ||
16 | #include <linux/dirent.h> | 17 | #include <linux/dirent.h> |
17 | #include <linux/security.h> | 18 | #include <linux/security.h> |
18 | #include <linux/syscalls.h> | 19 | #include <linux/syscalls.h> |
@@ -40,6 +41,7 @@ int iterate_dir(struct file *file, struct dir_context *ctx) | |||
40 | ctx->pos = file->f_pos; | 41 | ctx->pos = file->f_pos; |
41 | res = file->f_op->iterate(file, ctx); | 42 | res = file->f_op->iterate(file, ctx); |
42 | file->f_pos = ctx->pos; | 43 | file->f_pos = ctx->pos; |
44 | fsnotify_access(file); | ||
43 | file_accessed(file); | 45 | file_accessed(file); |
44 | } | 46 | } |
45 | mutex_unlock(&inode->i_mutex); | 47 | mutex_unlock(&inode->i_mutex); |