diff options
author | Amir Goldstein <[email protected]> | 2020-07-08 14:11:40 +0300 |
---|---|---|
committer | Jan Kara <[email protected]> | 2020-07-15 17:36:52 +0200 |
commit | 9991bb84b27a2594187898f261866cfc50255454 (patch) | |
tree | 14c649eff406a4d139bfdb16f38ea430f4cc69a2 /lib/test_overflow.c | |
parent | 9a02aa40dd5a95a62b184365d5b7847e8e6a3c96 (diff) |
kernfs: do not call fsnotify() with name without a parent
When creating an FS_MODIFY event on inode itself (not on parent)
the file_name argument should be NULL.
The change to send a non NULL name to inode itself was done on purpuse
as part of another commit, as Tejun writes: "...While at it, supply the
target file name to fsnotify() from kernfs_node->name.".
But this is wrong practice and inconsistent with inotify behavior when
watching a single file. When a child is being watched (as opposed to the
parent directory) the inotify event should contain the watch descriptor,
but not the file name.
Fixes: df6a58c5c5aa ("kernfs: don't depend on d_find_any_alias()...")
Link: https://lore.kernel.org/r/[email protected]
Acked-by: Tejun Heo <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Amir Goldstein <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions