On Sun 26-05-19 17:34:04, Amir Goldstein 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(+) Hum, I don't think all __rpc_depopulate() calls are guarded by i_rwsem (e.g. those in rpc_gssd_dummy_populate()). Why aren't we using rpc_depopulate() in those cases? Trond, Anna? Honza > > 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 > -- Jan Kara <jack@xxxxxxxx> SUSE Labs, CR