From: Amir Goldstein Date: Sun, 26 May 2019 14:34:04 +0000 (+0300) Subject: rpc_pipefs: call fsnotify_{unlink,rmdir}() hooks X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=a35d632c723cbbd0654efb7dfaa9947f258a16e5;p=linux.git rpc_pipefs: call fsnotify_{unlink,rmdir}() hooks This will allow generating fsnotify delete events after the fsnotify_nameremove() hook is removed from d_delete(). Cc: Trond Myklebust Cc: Anna Schumaker Reviewed-by: Trond Myklebust Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara --- diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c index 126d31472a995..73bd62979fe76 100644 --- a/net/sunrpc/rpc_pipe.c +++ b/net/sunrpc/rpc_pipe.c @@ -598,6 +598,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; @@ -609,6 +611,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;