From: Amir Goldstein Date: Sun, 26 May 2019 14:34:08 +0000 (+0300) Subject: debugfs: call fsnotify_{unlink,rmdir}() hooks X-Git-Tag: v5.4-rc1~629^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6679ea6dea15ec2fa7e2dd3c11cce639270c4386;p=platform%2Fkernel%2Flinux-rpi.git debugfs: call fsnotify_{unlink,rmdir}() hooks This will allow generating fsnotify delete events after the fsnotify_nameremove() hook is removed from d_delete(). Cc: Greg Kroah-Hartman Reviewed-by: Greg Kroah-Hartman Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara --- diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c index d89874d..1e444fe 100644 --- a/fs/debugfs/inode.c +++ b/fs/debugfs/inode.c @@ -643,8 +643,11 @@ static int __debugfs_remove(struct dentry *dentry, struct dentry *parent) dget(dentry); if (d_is_dir(dentry)) { ret = simple_rmdir(d_inode(parent), dentry); + if (!ret) + fsnotify_rmdir(d_inode(parent), dentry); } else { simple_unlink(d_inode(parent), dentry); + fsnotify_unlink(d_inode(parent), dentry); } if (!ret) d_delete(dentry);