Skip to content
Commit 936d6a38 authored by Gabriel Krisman Bertazi's avatar Gabriel Krisman Bertazi Committed by Jan Kara
Browse files

fanotify: Report fid info for file related file system errors



Plumb the pieces to add a FID report to error records.  Since all error
event memory must be pre-allocated, we pre-allocate the maximum file
handle size possible, such that it should always fit.

For errors that don't expose a file handle, report it with an invalid
FID. Internally we use zero-length FILEID_ROOT file handle for passing
the information (which we report as zero-length FILEID_INVALID file
handle to userspace) so we update the handle reporting code to deal with
this case correctly.

Link: https://lore.kernel.org/r/20211025192746.66445-27-krisman@collabora.com
Link: https://lore.kernel.org/r/20211025192746.66445-25-krisman@collabora.com
Signed-off-by: default avatarGabriel Krisman Bertazi <krisman@collabora.com>
Reviewed-by: default avatarAmir Goldstein <amir73il@gmail.com>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
[Folded two patches into 2 to make series bisectable]
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent 572c28f2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment