All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] fanotify: create FAN_ACCESS event for readdir
@ 2014-04-13 16:10 xypron.glpk
  2014-04-14 15:49 ` Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: xypron.glpk @ 2014-04-13 16:10 UTC (permalink / raw
  To: viro
  Cc: jack, eparis, mtk.manpages, linux-fsdevel, linux-kernel,
	Heinrich Schuchardt

From: Heinrich Schuchardt <xypron.glpk@gmx.de>

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>
---
 fs/readdir.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/readdir.c b/fs/readdir.c
index 5b53d99..33fd922 100644
--- a/fs/readdir.c
+++ b/fs/readdir.c
@@ -13,6 +13,7 @@
 #include <linux/stat.h>
 #include <linux/file.h>
 #include <linux/fs.h>
+#include <linux/fsnotify.h>
 #include <linux/dirent.h>
 #include <linux/security.h>
 #include <linux/syscalls.h>
@@ -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);
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] fanotify: create FAN_ACCESS event for readdir
  2014-04-13 16:10 [PATCH 1/1] fanotify: create FAN_ACCESS event for readdir xypron.glpk
@ 2014-04-14 15:49 ` Jan Kara
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2014-04-14 15:49 UTC (permalink / raw
  To: xypron.glpk; +Cc: viro, jack, eparis, mtk.manpages, linux-fsdevel, linux-kernel

On Sun 13-04-14 18:10:30, xypron.glpk@gmx.de wrote:
> From: Heinrich Schuchardt <xypron.glpk@gmx.de>
> 
> 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>
  Makes sense. You can add:
Reviewed-by: Jan Kara <jack@suse.cz>

							Honza

> ---
>  fs/readdir.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/fs/readdir.c b/fs/readdir.c
> index 5b53d99..33fd922 100644
> --- a/fs/readdir.c
> +++ b/fs/readdir.c
> @@ -13,6 +13,7 @@
>  #include <linux/stat.h>
>  #include <linux/file.h>
>  #include <linux/fs.h>
> +#include <linux/fsnotify.h>
>  #include <linux/dirent.h>
>  #include <linux/security.h>
>  #include <linux/syscalls.h>
> @@ -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);
> -- 
> 1.7.10.4
> 
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-04-14 15:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-13 16:10 [PATCH 1/1] fanotify: create FAN_ACCESS event for readdir xypron.glpk
2014-04-14 15:49 ` Jan Kara

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.