fanotify: Add helpers to decide whether to report FID/DFID
authorGabriel Krisman Bertazi <krisman@collabora.com>
Mon, 25 Oct 2021 19:27:38 +0000 (16:27 -0300)
committerJan Kara <jack@suse.cz>
Wed, 27 Oct 2021 10:37:20 +0000 (12:37 +0200)
commit4bd5a5c8e6e5cd964e9738e6ef87f6c2cb453edf
tree0bbe923f386411b6ca8fce6e911da7e8e93d5b2f
parent2c5069433a3adc01ff9c5673567961bb7f138074
fanotify: Add helpers to decide whether to report FID/DFID

Now that there is an event that reports FID records even for a zeroed
file handle, wrap the logic that deides whether to issue the records
into helper functions.  This shouldn't have any impact on the code, but
simplifies further patches.

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