summaryrefslogtreecommitdiff
path: root/fs/exportfs
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2023-12-31 03:46:00 +0300
committerChuck Lever <chuck.lever@oracle.com>2024-01-23 18:58:56 +0300
commit42c3732fa8073717dd7d924472f1c0bc5b452fdc (patch)
treed62658e93e5fe91a8e0e75b7c1ab90d384c90e54 /fs/exportfs
parent9473c4450e9c83d890d435577a3776d925fa748c (diff)
downloadlinux-42c3732fa8073717dd7d924472f1c0bc5b452fdc.tar.xz
fs: Create a generic is_dot_dotdot() utility
De-duplicate the same functionality in several places by hoisting the is_dot_dotdot() utility function into linux/fs.h. Suggested-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Acked-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/exportfs')
-rw-r--r--fs/exportfs/expfs.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/fs/exportfs/expfs.c b/fs/exportfs/expfs.c
index dcf7d86c2ce4..07ea3d62b298 100644
--- a/fs/exportfs/expfs.c
+++ b/fs/exportfs/expfs.c
@@ -244,16 +244,6 @@ struct getdents_callback {
int sequence; /* sequence counter */
};
-/* Copied from lookup_one_common() */
-static inline bool is_dot_dotdot(const char *name, size_t len)
-{
- if (unlikely(name[0] == '.')) {
- if (len < 2 || (len == 2 && name[1] == '.'))
- return true;
- }
- return false;
-}
-
/*
* A rather strange filldir function to capture
* the name matching the specified inode number.