summaryrefslogtreecommitdiff
path: root/fs/debugfs
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2019-05-26 17:34:08 +0300
committerJan Kara <jack@suse.cz>2019-06-20 14:47:09 +0200
commit6679ea6dea15ec2fa7e2dd3c11cce639270c4386 (patch)
tree3095dde58b4ca1a61867aaa7785ac8633c886052 /fs/debugfs
parent823e545c027795997f29ec5c255aff605cf39e85 (diff)
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 <gregkh@linuxfoundation.org> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/debugfs')
-rw-r--r--fs/debugfs/inode.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
index d89874da9791..1e444fe1f778 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);