fanotify: distinguish between fid encode error and null fid
authorAmir Goldstein <amir73il@gmail.com>
Thu, 16 Jul 2020 08:42:11 +0000 (11:42 +0300)
committerJan Kara <jack@suse.cz>
Mon, 27 Jul 2020 19:23:36 +0000 (21:23 +0200)
commit6ad1aadd970460d81d5e803ac38c0f63f85c0a00
treedb16832321f2745bfd9e0c90c9e723a33e407ae2
parent103ff6a554923e0da54e0a28a686c91facf5bffd
fanotify: distinguish between fid encode error and null fid

In fanotify_encode_fh(), both cases of NULL inode and failure to encode
ended up with fh type FILEID_INVALID.

Distiguish the case of NULL inode, by setting fh type to FILEID_ROOT.
This is just a semantic difference at this point.

Remove stale comment and unneeded check from fid event compare helpers.

Link: https://lore.kernel.org/r/20200716084230.30611-4-amir73il@gmail.com
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/notify/fanotify/fanotify.c