From: Heinrich Schuchardt Date: Thu, 24 Apr 2014 22:55:27 +0000 (+1000) Subject: fanotify: create FAN_ACCESS event for readdir X-Git-Tag: next-20140428~2^2~233 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=261dcd4613c76674f14e2b753af36ea41042e1be;p=karo-tx-linux.git 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 Reviewed-by: Jan Kara Cc: Eric Paris Signed-off-by: Andrew Morton --- 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 @@ #include #include #include +#include #include #include #include @@ -40,6 +41,7 @@ int iterate_dir(struct file *file, struct dir_context *ctx) ctx->pos = file->f_pos; res = file->f_op->iterate(file, ctx); file->f_pos = ctx->pos; + fsnotify_access(file); file_accessed(file); } mutex_unlock(&inode->i_mutex);