1
0
Fork 0

f2fs: fix dcache lookup of !casefolded directories

commit 5515eae647 upstream.

Do the name comparison for non-casefolded directories correctly.

This is analogous to ext4's commit 66883da1ee ("ext4: fix dcache
lookup of !casefolded directories").

Fixes: 2c2eb7a300 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5.4-rM2-2.2.x-imx-squashed
Eric Biggers 2020-01-23 20:15:48 -08:00 committed by Greg Kroah-Hartman
parent f4803553aa
commit 6d722cd2e3
1 changed files with 1 additions and 1 deletions

View File

@ -1072,7 +1072,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);