summaryrefslogtreecommitdiff
path: root/fs/f2fs
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2020-01-23 20:15:48 -0800
committerJaegeuk Kim <jaegeuk@kernel.org>2020-01-24 09:53:02 -0800
commit5515eae647426169e4b7969271fb207881eba7f6 (patch)
treeb2816ff2b9e5fbb51063c54b0d466fbd53d2e1b7 /fs/f2fs
parentfc7100ea2a52fcf200be75421bfd32652827d287 (diff)
f2fs: fix dcache lookup of !casefolded directories
Do the name comparison for non-casefolded directories correctly. This is analogous to ext4's commit 66883da1eee8 ("ext4: fix dcache lookup of !casefolded directories"). Fixes: 2c2eb7a300cd ("f2fs: Support case-insensitive file name lookups") Cc: <stable@vger.kernel.org> # v5.4+ Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
index b56f6060c1a6..aea9e2806144 100644
--- a/fs/f2fs/dir.c
+++ b/fs/f2fs/dir.c
@@ -1087,7 +1087,7 @@ static int f2fs_d_compare(const struct dentry *dentry, unsigned int len,
if (!IS_CASEFOLDED(dentry->d_parent->d_inode)) {
if (len != name->len)
return -1;
- return memcmp(str, name, len);
+ return memcmp(str, name->name, len);
}
return f2fs_ci_compare(dentry->d_parent->d_inode, name, &qstr, false);