]> git.baikalelectronics.ru Git - kernel.git/commit
fsnotify: pass dentry instead of inode data
authorAmir Goldstein <amir73il@gmail.com>
Mon, 25 Oct 2021 19:27:17 +0000 (16:27 -0300)
committerJan Kara <jack@suse.cz>
Wed, 27 Oct 2021 10:32:09 +0000 (12:32 +0200)
commite4a2583afce97f8cd5a4b347086293917a2012e8
treea6283ae4fdceb6c578ea501e11f643503e846b65
parent965d2fc59276e52311576f4c81aa960d90288d4f
fsnotify: pass dentry instead of inode data

Define a new data type to pass for event - FSNOTIFY_EVENT_DENTRY.
Use it to pass the dentry instead of it's ->d_inode where available.

This is needed in preparation to the refactor to retrieve the super
block from the data field.  In some cases (i.e. mkdir in kernfs), the
data inode comes from a negative dentry, such that no super block
information would be available. By receiving the dentry itself, instead
of the inode, fsnotify can derive the super block even on these cases.

Link: https://lore.kernel.org/r/20211025192746.66445-3-krisman@collabora.com
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
[Expand explanation in commit message]
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
Signed-off-by: Jan Kara <jack@suse.cz>
include/linux/fsnotify.h
include/linux/fsnotify_backend.h