[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200124041549.159983-2-ebiggers@kernel.org>
Date: Thu, 23 Jan 2020 20:15:48 -0800
From: Eric Biggers <ebiggers@...nel.org>
To: linux-f2fs-devel@...ts.sourceforge.net
Cc: linux-fsdevel@...r.kernel.org, linux-ext4@...r.kernel.org,
Alexander Viro <viro@...iv.linux.org.uk>,
Daniel Rosenberg <drosen@...gle.com>,
Gabriel Krisman Bertazi <krisman@...labora.com>
Subject: [PATCH 1/2] f2fs: fix dcache lookup of !casefolded directories
From: Eric Biggers <ebiggers@...gle.com>
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@...r.kernel.org> # v5.4+
Signed-off-by: Eric Biggers <ebiggers@...gle.com>
---
fs/f2fs/dir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
index b56f6060c1a6b..aea9e2806144d 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);
--
2.25.0
Powered by blists - more mailing lists