shmem: allow reporting fanotify events with file handles on tmpfs
Since kernel v5.1, fanotify_init(2) supports the flag FAN_REPORT_FID
for identifying objects using file handle and fsid in events.
fanotify_mark(2) fails with -ENODEV when trying to set a mark on
filesystems that report null f_fsid in stasfs(2).
Use the digest of uuid as f_fsid for tmpfs to uniquely identify tmpfs
objects as best as possible and allow setting an fanotify mark that
reports events with file handles on tmpfs.
Acked-by: Hugh Dickins <firstname.lastname@example.org>
Reviewed-by: Christian Brauner <email@example.com>
Signed-off-by: Amir Goldstein <firstname.lastname@example.org>
Signed-off-by: Jan Kara <email@example.com>
1 file changed