summaryrefslogtreecommitdiff
path: root/fs/kernfs
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2020-07-22 15:58:46 +0300
committerJan Kara <jack@suse.cz>2020-07-27 23:15:48 +0200
commit40a100d3adc1ad7f0a34875468c499fcecd20ba4 (patch)
tree47a7458fdf4cbe77169f1e6672aa3e1450b4c5b1 /fs/kernfs
parent82ace1efb3cb1d49a1681cc6e31156047d5ae1f2 (diff)
fsnotify: pass dir and inode arguments to fsnotify()
The arguments of fsnotify() are overloaded and mean different things for different event types. Replace the to_tell argument with separate arguments @dir and @inode, because we may be sending to both dir and child. Using the @data argument to pass the child is not enough, because dirent events pass this argument (for audit), but we do not report to child. Document the new fsnotify() function argumenets. Link: https://lore.kernel.org/r/20200722125849.17418-7-amir73il@gmail.com Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/kernfs')
-rw-r--r--fs/kernfs/file.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/kernfs/file.c b/fs/kernfs/file.c
index 1d185bffc52f..f277d023ebcd 100644
--- a/fs/kernfs/file.c
+++ b/fs/kernfs/file.c
@@ -902,8 +902,9 @@ repeat:
if (parent) {
p_inode = ilookup(info->sb, kernfs_ino(parent));
if (p_inode) {
- fsnotify(p_inode, FS_MODIFY | FS_EVENT_ON_CHILD,
- inode, FSNOTIFY_EVENT_INODE, &name, 0);
+ fsnotify(FS_MODIFY | FS_EVENT_ON_CHILD,
+ inode, FSNOTIFY_EVENT_INODE,
+ p_inode, &name, inode, 0);
iput(p_inode);
}