mirror of
https://github.com/armbian/linux-cix.git
synced 2026-01-06 12:30:45 -08:00
9p: v9fs_fid_find: also lookup by inode if not found dentry
[ Upstream commit 38d222b3163f7b7d737e5d999ffc890a12870e36 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
f1ab3a1bcb
commit
a63c78c349
@@ -131,10 +131,9 @@ static struct p9_fid *v9fs_fid_find(struct dentry *dentry, kuid_t uid, int any)
|
||||
}
|
||||
}
|
||||
spin_unlock(&dentry->d_lock);
|
||||
} else {
|
||||
if (dentry->d_inode)
|
||||
ret = v9fs_fid_find_inode(dentry->d_inode, false, uid, any);
|
||||
}
|
||||
if (!ret && dentry->d_inode)
|
||||
ret = v9fs_fid_find_inode(dentry->d_inode, false, uid, any);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user