From: Amir Goldstein Date: Sun, 26 May 2019 14:34:05 +0000 (+0300) Subject: tracefs: call fsnotify_{unlink,rmdir}() hooks X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=4bf2377472c7ca8f9523f8ccce9ade212483dba4;p=linux.git tracefs: call fsnotify_{unlink,rmdir}() hooks This will allow generating fsnotify delete events after the fsnotify_nameremove() hook is removed from d_delete(). Cc: Steven Rostedt Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara --- diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c index 7098c49f36934..497a8682b5b94 100644 --- a/fs/tracefs/inode.c +++ b/fs/tracefs/inode.c @@ -509,9 +509,12 @@ static int __tracefs_remove(struct dentry *dentry, struct dentry *parent) switch (dentry->d_inode->i_mode & S_IFMT) { case S_IFDIR: ret = simple_rmdir(parent->d_inode, dentry); + if (!ret) + fsnotify_rmdir(parent->d_inode, dentry); break; default: simple_unlink(parent->d_inode, dentry); + fsnotify_unlink(parent->d_inode, dentry); break; } if (!ret)