From: Chi Zhiling <chizhiling@163.com>
To: Sungjong Seo <sj1557.seo@samsung.com>,
'Namjae Jeon' <linkinjeon@kernel.org>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
'Chi Zhiling' <chizhiling@kylinos.cn>,
cpgs@samsung.com
Subject: Re: [PATCH v2 3/6] exfat: use exfat_fat_walk helper to simplify fat entry walking
Date: Fri, 3 Apr 2026 10:43:05 +0800 [thread overview]
Message-ID: <6839cce0-4d2e-4b14-9dfc-990185fb9149@163.com> (raw)
In-Reply-To: <015c01dcc2ac$1ffd7520$5ff85f60$@samsung.com>
On 4/2/26 10:22 PM, Sungjong Seo wrote:
> Hi, Chi Zhiling,
>> Replace the custom exfat_walk_fat_chain() function and open-coded FAT
>> chain walking logic with the exfat_fat_walk() helper across
>> exfat_find_location, __exfat_get_dentry_set, and exfat_map_cluster.
>>
>> Signed-off-by: Chi Zhiling <chizhiling@kylinos.cn>
>> ---
>> fs/exfat/dir.c | 39 +++------------------------------------
>> fs/exfat/inode.c | 11 ++---------
>> 2 files changed, 5 insertions(+), 45 deletions(-)
>>
>> diff --git a/fs/exfat/dir.c b/fs/exfat/dir.c index
>> 7619410d668e..cfc6f16a5fb2 100644
>> --- a/fs/exfat/dir.c
>> +++ b/fs/exfat/dir.c
>> @@ -562,38 +562,6 @@ int exfat_put_dentry_set(struct
>> exfat_entry_set_cache *es, int sync)
>> return err;
>> }
>>
>> -static int exfat_walk_fat_chain(struct super_block *sb,
>> - struct exfat_chain *p_dir, unsigned int byte_offset,
>> - unsigned int *clu)
>> -{
>> - struct exfat_sb_info *sbi = EXFAT_SB(sb);
>> - unsigned int clu_offset;
>> - unsigned int cur_clu;
>> -
>> - clu_offset = EXFAT_B_TO_CLU(byte_offset, sbi);
>> - cur_clu = p_dir->dir;
>> -
>> - if (p_dir->flags == ALLOC_NO_FAT_CHAIN) {
>> - cur_clu += clu_offset;
>> - } else {
>> - while (clu_offset > 0) {
>> - if (exfat_get_next_cluster(sb, &cur_clu))
>> - return -EIO;
>> - if (cur_clu == EXFAT_EOF_CLUSTER) {
>
> The intentional exfat_fs_error() call for chain damage conditions is lost.
> Instead of removing the error handling for this condition, it had better be
> moved to exfat_find_location().
Wow, you’re right, I did miss that.
and your suggestion is great.
Thanks,
next prev parent reply other threads:[~2026-04-03 2:43 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-01 7:11 [PATCH v2 0/6] exfat: unify FAT chain walking helpers Chi Zhiling
2026-04-01 7:11 ` [PATCH v2 1/6] exfat: fix incorrect directory checksum after rename to shorter name Chi Zhiling
2026-04-01 7:11 ` [PATCH v2 2/6] exfat: introduce exfat_fat_walk helper Chi Zhiling
2026-04-03 2:34 ` Yuezhang.Mo
2026-04-03 2:44 ` Chi Zhiling
2026-04-01 7:11 ` [PATCH v2 3/6] exfat: use exfat_fat_walk helper to simplify fat entry walking Chi Zhiling
2026-04-02 14:22 ` Sungjong Seo
2026-04-03 2:43 ` Chi Zhiling [this message]
2026-04-01 7:11 ` [PATCH v2 4/6] exfat: remove NULL cache pointer case in exfat_ent_get Chi Zhiling
2026-04-01 7:11 ` [PATCH v2 5/6] exfat: introduce exfat_chain_advance helper Chi Zhiling
2026-04-03 2:34 ` Yuezhang.Mo
2026-04-03 2:47 ` Chi Zhiling
2026-04-03 3:33 ` Yuezhang.Mo
2026-04-03 4:28 ` Chi Zhiling
2026-04-01 7:11 ` [PATCH v2 6/6] exfat: use " Chi Zhiling
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6839cce0-4d2e-4b14-9dfc-990185fb9149@163.com \
--to=chizhiling@163.com \
--cc=chizhiling@kylinos.cn \
--cc=cpgs@samsung.com \
--cc=linkinjeon@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sj1557.seo@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®