On Sun, May 26, 2019 at 05:34:08PM +0300, Amir Goldstein wrote: > This will allow generating fsnotify delete events after the > fsnotify_nameremove() hook is removed from d_delete(). > > Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> > Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx> > --- > fs/debugfs/inode.c | 3 +++ > 1 file changed, 3 insertions(+) > > 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); > -- > 2.17.1 Reviewed-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>