From: Jan Kara <jack@suse.cz>
To: xypron.glpk@gmx.de
Cc: viro@zeniv.linux.org.uk, jack@suse.cz, eparis@redhat.com,
mtk.manpages@gmail.com, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] fanotify: create FAN_ACCESS event for readdir
Date: Mon, 14 Apr 2014 17:49:11 +0200 [thread overview]
Message-ID: <20140414154911.GA13860@quack.suse.cz> (raw)
In-Reply-To: <1397405430-7577-1-git-send-email-xypron.glpk@gmx.de>
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
prev parent reply other threads:[~2014-04-14 15:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140414154911.GA13860@quack.suse.cz \
--to=jack@suse.cz \
--cc=eparis@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=viro@zeniv.linux.org.uk \
--cc=xypron.glpk@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).