summaryrefslogtreecommitdiff
path: root/fs/crypto
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2024-01-23 19:25:51 +0300
committerChristian Brauner <brauner@kernel.org>2024-01-23 19:56:30 +0300
commit0000ff2523df42bcf3c2fe3e8daaeca038835487 (patch)
tree1be5d8f49a61fe06ce678aba9fa55cf513caf7c0 /fs/crypto
parentbd46543d7f9a8b2c03420499b1885287e96aaf28 (diff)
parent42c3732fa8073717dd7d924472f1c0bc5b452fdc (diff)
downloadlinux-0000ff2523df42bcf3c2fe3e8daaeca038835487.tar.xz
Merge tag 'exportfs-6.9' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/cel/linux
Merge exportfs fixes from Chuck Lever: * tag 'exportfs-6.9' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/cel/linux: fs: Create a generic is_dot_dotdot() utility exportfs: fix the fallback implementation of the get_name export operation Link: https://lore.kernel.org/r/BDC2AEB4-7085-4A7C-8DE8-A659FE1DBA6A@oracle.com Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/crypto')
-rw-r--r--fs/crypto/fname.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/fs/crypto/fname.c b/fs/crypto/fname.c
index 7b3fc189593a..0ad52fbe51c9 100644
--- a/fs/crypto/fname.c
+++ b/fs/crypto/fname.c
@@ -74,13 +74,7 @@ struct fscrypt_nokey_name {
static inline bool fscrypt_is_dot_dotdot(const struct qstr *str)
{
- if (str->len == 1 && str->name[0] == '.')
- return true;
-
- if (str->len == 2 && str->name[0] == '.' && str->name[1] == '.')
- return true;
-
- return false;
+ return is_dot_dotdot(str->name, str->len);
}
/**