summaryrefslogtreecommitdiffstats
path: root/fs/tracefs
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2019-05-26 17:34:05 +0300
committerJan Kara <jack@suse.cz>2019-06-20 14:46:31 +0200
commit4bf2377472c7ca8f9523f8ccce9ade212483dba4 (patch)
tree556a836c8e5833fe90d972c15630d3bd6d9651c0 /fs/tracefs
parenta35d632c723cbbd0654efb7dfaa9947f258a16e5 (diff)
downloadlinux-4bf2377472c7ca8f9523f8ccce9ade212483dba4.tar.gz
linux-4bf2377472c7ca8f9523f8ccce9ade212483dba4.tar.bz2
linux-4bf2377472c7ca8f9523f8ccce9ade212483dba4.zip
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 <rostedt@goodmis.org> Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/tracefs')
-rw-r--r--fs/tracefs/inode.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c
index 7098c49f3693..497a8682b5b9 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)