summaryrefslogtreecommitdiff
path: root/fs/btrfs
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2019-05-26 17:34:03 +0300
committerJan Kara <jack@suse.cz>2019-06-20 15:45:04 +0300
commit46008d9d3f0ef78524c327dbd5cc99843d4b3dae (patch)
treee6092fb36327ced878f3e6735cd1750b23f97334 /fs/btrfs
parent116b9731ad7614032a390bb9ad8998a14d6dc752 (diff)
downloadlinux-46008d9d3f0ef78524c327dbd5cc99843d4b3dae.tar.xz
btrfs: call fsnotify_rmdir() hook
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>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/ioctl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 6dafa857bbb9..2cfd1bfb3871 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -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);