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

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Acked-by: David Sterba <dsterba@suse.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/btrfs/ioctl.c

index 6dafa85..2cfd1bf 100644 (file)
@@ -2930,8 +2930,10 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file,
        inode_lock(inode);
        err = btrfs_delete_subvolume(dir, dentry);
        inode_unlock(inode);
-       if (!err)
+       if (!err) {
+               fsnotify_rmdir(dir, dentry);
                d_delete(dentry);
+       }
 
 out_dput:
        dput(dentry);