Commit 6679ea6d authored by Amir Goldstein's avatar Amir Goldstein Committed by Jan Kara

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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarAmir Goldstein <amir73il@gmail.com>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent 823e545c
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment