]> Git Repo - linux.git/commit
exportfs: fix the fallback implementation of the get_name export operation
authorTrond Myklebust <[email protected]>
Thu, 28 Dec 2023 20:15:10 +0000 (15:15 -0500)
committerChuck Lever <[email protected]>
Tue, 23 Jan 2024 15:58:44 +0000 (10:58 -0500)
commit9473c4450e9c83d890d435577a3776d925fa748c
treeabc45bdc064fc694191b1f21be9121de9eaf1929
parent0dd3ee31125508cd67f7e7172247f05b7fd1753a
exportfs: fix the fallback implementation of the get_name export operation

The fallback implementation for the get_name export operation uses
readdir() to try to match the inode number to a filename. That filename
is then used together with lookup_one() to produce a dentry.
A problem arises when we match the '.' or '..' entries, since that
causes lookup_one() to fail. This has sometimes been seen to occur for
filesystems that violate POSIX requirements around uniqueness of inode
numbers, something that is common for snapshot directories.

This patch just ensures that we skip '.' and '..' rather than allowing a
match.

Signed-off-by: Trond Myklebust <[email protected]>
Reviewed-by: Jeff Layton <[email protected]>
Acked-by: Amir Goldstein <[email protected]>
Link: https://lore.kernel.org/linux-nfs/CAOQ4uxiOZobN76OKB-VBNXWeFKVwLW_eK5QtthGyYzWU9mjb7Q@mail.gmail.com/
Acked-by: Christian Brauner <[email protected]>
Signed-off-by: Chuck Lever <[email protected]>
fs/exportfs/expfs.c
This page took 0.055078 seconds and 4 git commands to generate.