From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kara Subject: Re: [PATCH 1/1] fanotify: create FAN_ACCESS event for readdir Date: Mon, 14 Apr 2014 17:49:11 +0200 Message-ID: <20140414154911.GA13860@quack.suse.cz> References: <1397405430-7577-1-git-send-email-xypron.glpk@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 To: xypron.glpk@gmx.de Return-path: Content-Disposition: inline In-Reply-To: <1397405430-7577-1-git-send-email-xypron.glpk@gmx.de> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Sun 13-04-14 18:10:30, xypron.glpk@gmx.de wrote: > From: Heinrich Schuchardt > > 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 Makes sense. You can add: Reviewed-by: Jan Kara 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 > #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); > -- > 1.7.10.4 > -- Jan Kara SUSE Labs, CR