Commit d4c7cf6c authored by Heinrich Schuchardt's avatar Heinrich Schuchardt Committed by Linus Torvalds

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: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Cc: Eric Paris <eparis@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0a8dd2db
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <linux/stat.h> #include <linux/stat.h>
#include <linux/file.h> #include <linux/file.h>
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/fsnotify.h>
#include <linux/dirent.h> #include <linux/dirent.h>
#include <linux/security.h> #include <linux/security.h>
#include <linux/syscalls.h> #include <linux/syscalls.h>
...@@ -40,6 +41,7 @@ int iterate_dir(struct file *file, struct dir_context *ctx) ...@@ -40,6 +41,7 @@ int iterate_dir(struct file *file, struct dir_context *ctx)
ctx->pos = file->f_pos; ctx->pos = file->f_pos;
res = file->f_op->iterate(file, ctx); res = file->f_op->iterate(file, ctx);
file->f_pos = ctx->pos; file->f_pos = ctx->pos;
fsnotify_access(file);
file_accessed(file); file_accessed(file);
} }
mutex_unlock(&inode->i_mutex); mutex_unlock(&inode->i_mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment