Re: [PATCH v3 03/10] rpc_pipefs: call fsnotify_{unlink,rmdir}() hooks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2019-05-30 at 08:43 +0300, Amir Goldstein wrote:
> Hi Trond,Anna,Bruce,
> 
> Seems that rpc_pipefs is co-maintained by client and server trees, so
> not sure who is the best to ask for an ack.
> We need to add those explicit fsnotify hooks to match the existing
> fsnotify_create/mkdir hooks, because
> the hook embedded inside d_delete() is going away [1].
> 
> Thanks,
> Amir.
> 
> [1] 
> https://lore.kernel.org/linux-fsdevel/20190526143411.11244-1-amir73il@xxxxxxxxx/
> 
> On Sun, May 26, 2019 at 5:34 PM Amir Goldstein <amir73il@xxxxxxxxx>
> wrote:
> > This will allow generating fsnotify delete events after the
> > fsnotify_nameremove() hook is removed from d_delete().
> > 
> > Cc: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>
> > Cc: Anna Schumaker <anna.schumaker@xxxxxxxxxx>
> > Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx>
> > ---
> >  net/sunrpc/rpc_pipe.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
> > index 979d23646e33..917c85f15a0b 100644
> > --- a/net/sunrpc/rpc_pipe.c
> > +++ b/net/sunrpc/rpc_pipe.c
> > @@ -597,6 +597,8 @@ static int __rpc_rmdir(struct inode *dir,
> > struct dentry *dentry)
> > 
> >         dget(dentry);
> >         ret = simple_rmdir(dir, dentry);
> > +       if (!ret)
> > +               fsnotify_rmdir(dir, dentry);
> >         d_delete(dentry);
> >         dput(dentry);
> >         return ret;
> > @@ -608,6 +610,8 @@ static int __rpc_unlink(struct inode *dir,
> > struct dentry *dentry)
> > 
> >         dget(dentry);
> >         ret = simple_unlink(dir, dentry);
> > +       if (!ret)
> > +               fsnotify_unlink(dir, dentry);
> >         d_delete(dentry);
> >         dput(dentry);
> >         return ret;
> > --
> > 2.17.1
> > 

This looks just fine to me.

Acked-by: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>


-- 
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@xxxxxxxxxxxxxxx






[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux