Skip to content

Commit

Permalink
f2fs: fix dcache lookup of !casefolded directories
Browse files Browse the repository at this point in the history
Do the name comparison for non-casefolded directories correctly.

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

Fixes: 2c2eb7a ("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>
  • Loading branch information
Eric Biggers authored and Jaegeuk Kim committed Jan 24, 2020
1 parent fc7100e commit 5515eae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/f2fs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5515eae

Please sign in to comment.