From: Amir Goldstein Date: Sun, 26 May 2019 14:34:03 +0000 (+0300) Subject: btrfs: call fsnotify_rmdir() hook X-Git-Tag: microblaze-v5.4-rc1~360^2~8 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=46008d9d3f0ef78524c327dbd5cc99843d4b3dae;p=linux-2.6-microblaze.git 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 Acked-by: David Sterba Signed-off-by: Jan Kara --- 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);