diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2023-12-31 01:46:00 +0100 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2024-01-23 16:58:56 +0100 |
commit | 42c3732fa8073717dd7d924472f1c0bc5b452fdc (patch) | |
tree | d62658e93e5fe91a8e0e75b7c1ab90d384c90e54 /fs/f2fs | |
parent | exportfs: fix the fallback implementation of the get_name export operation (diff) | |
download | linux-42c3732fa8073717dd7d924472f1c0bc5b452fdc.tar.xz linux-42c3732fa8073717dd7d924472f1c0bc5b452fdc.zip |
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/f2fs')
-rw-r--r-- | fs/f2fs/f2fs.h | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 9043cedfa12b..322a3b8a3533 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -3368,17 +3368,6 @@ static inline bool f2fs_cp_error(struct f2fs_sb_info *sbi) return is_set_ckpt_flags(sbi, CP_ERROR_FLAG); } -static inline bool is_dot_dotdot(const u8 *name, size_t len) -{ - if (len == 1 && name[0] == '.') - return true; - - if (len == 2 && name[0] == '.' && name[1] == '.') - return true; - - return false; -} - static inline void *f2fs_kmalloc(struct f2fs_sb_info *sbi, size_t size, gfp_t flags) { |