]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
f2fs: split f2fs_d_compare() from f2fs_match_name()
authorEric Biggers <ebiggers@google.com>
Thu, 7 May 2020 07:59:03 +0000 (00:59 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jun 2020 15:49:20 +0000 (17:49 +0200)
commitf526af054c18bb5bc5944b8551d25394bd02bc68
treed30cf2262f0327a6b3cbe97fde3d4e1ae4ce6529
parent738f369bf012f557ed165efd2dbfc976fec278b6
f2fs: split f2fs_d_compare() from f2fs_match_name()

[ Upstream commit f874fa1c7c7905c1744a2037a11516558ed00a81 ]

Sharing f2fs_ci_compare() between comparing cached dentries
(f2fs_d_compare()) and comparing on-disk dentries (f2fs_match_name())
doesn't work as well as intended, as these actions fundamentally differ
in several ways (e.g. whether the task may sleep, whether the directory
is stable, whether the casefolded name was precomputed, whether the
dentry will need to be decrypted once we allow casefold+encrypt, etc.)

Just make f2fs_d_compare() implement what it needs directly, and rework
f2fs_ci_compare() to be specialized for f2fs_match_name().

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/f2fs/dir.c
fs/f2fs/f2fs.h