rpc_pipefs: call fsnotify_{unlink,rmdir}() hooks
authorAmir Goldstein <amir73il@gmail.com>
Sun, 26 May 2019 14:34:04 +0000 (17:34 +0300)
committerJan Kara <jack@suse.cz>
Thu, 20 Jun 2019 12:46:04 +0000 (14:46 +0200)
This will allow generating fsnotify delete events after the
fsnotify_nameremove() hook is removed from d_delete().

Cc: Trond Myklebust <trond.myklebust@hammerspace.com>
Cc: Anna Schumaker <anna.schumaker@netapp.com>
Reviewed-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
net/sunrpc/rpc_pipe.c

index 126d314..73bd629 100644 (file)
@@ -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;