fanotify: Support null inode event in fanotify_dfid_inode
authorGabriel Krisman Bertazi <krisman@collabora.com>
Mon, 25 Oct 2021 19:27:28 +0000 (16:27 -0300)
committerJan Kara <jack@suse.cz>
Wed, 27 Oct 2021 10:34:25 +0000 (12:34 +0200)
commit12f47bf0f0990933d95d021d13d31bda010648fd
tree91e6308596227c968bf9452aa737c79e3bcddeda
parent330ae77d2a5b0af32c0f29e139bf28ec8591de59
fanotify: Support null inode event in fanotify_dfid_inode

FAN_FS_ERROR doesn't support DFID, but this function is still called for
every event.  The problem is that it is not capable of handling null
inodes, which now can happen in case of superblock error events.  For
this case, just returning dir will be enough.

Link: https://lore.kernel.org/r/20211025192746.66445-14-krisman@collabora.com
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/notify/fanotify/fanotify.c