9p: v9fs_fid_find: also lookup by inode if not found dentry
authorDominique Martinet <asmadeus@codewreck.org>
Thu, 23 May 2024 11:31:38 +0000 (20:31 +0900)
committerDominique Martinet <asmadeus@codewreck.org>
Sun, 22 Sep 2024 20:51:27 +0000 (05:51 +0900)
commit38d222b3163f7b7d737e5d999ffc890a12870e36
treeb12f754508efc850c23401df0baadb299eb4fb05
parent98f7e32f20d28ec452afb208f9cffc08448a2652
9p: v9fs_fid_find: also lookup by inode if not found dentry

It's possible for v9fs_fid_find "find by dentry" branch to not turn up
anything despite having an entry set (because e.g. uid doesn't match),
in which case the calling code will generally make an extra lookup
to the server.

In this case we might have had better luck looking by inode, so fall
back to look up by inode if we have one and the lookup by dentry failed.

Message-Id: <20240523210024.1214386-1-asmadeus@codewreck.org>
Reviewed-by: Christian Schoenebeck <linux_oss@crudebyte.com>
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
fs/9p/fid.c