Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c34b827 authored by Eric Biggers's avatar Eric Biggers Committed by Jaegeuk Kim
Browse files

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: default avatarEric Biggers <ebiggers@google.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent c7288909
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -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 (!IS_CASEFOLDED(dentry->d_parent->d_inode)) {
		if (len != name->len)
		if (len != name->len)
			return -1;
			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);
	return f2fs_ci_compare(dentry->d_parent->d_inode, name, &qstr, false);