From: Chi Zhiling <chizhiling@163.com>
To: "Yuezhang.Mo@sony.com" <Yuezhang.Mo@sony.com>
Cc: "brauner@kernel.org" <brauner@kernel.org>,
"chizhiling@kylinos.cn" <chizhiling@kylinos.cn>,
"jack@suse.cz" <jack@suse.cz>,
"linkinjeon@kernel.org" <linkinjeon@kernel.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"sj1557.seo@samsung.com" <sj1557.seo@samsung.com>,
"viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
"willy@infradead.org" <willy@infradead.org>
Subject: Re: [PATCH v1 6/9] exfat: remove unused parameters from exfat_get_cluster
Date: Wed, 31 Dec 2025 09:44:49 +0800 [thread overview]
Message-ID: <29ca8dd9-3a00-490a-8a20-7d187b7ab7ff@163.com> (raw)
In-Reply-To: <PUZPR04MB6316EAFF1D1D002551408CD181BCA@PUZPR04MB6316.apcprd04.prod.outlook.com>
On 12/30/25 17:05, Yuezhang.Mo@sony.com wrote:
>> diff --git a/fs/exfat/inode.c b/fs/exfat/inode.c
>> index f9501c3a3666..1062ce470cb1 100644
>> --- a/fs/exfat/inode.c
>> +++ b/fs/exfat/inode.c
>> @@ -157,28 +157,26 @@ static int exfat_map_cluster(struct inode *inode, unsigned int clu_offset,
>> *clu += clu_offset;
>> }
>> } else if (ei->type == TYPE_FILE) {
>> - unsigned int fclus = 0;
>> int err = exfat_get_cluster(inode, clu_offset,
>> - &fclus, clu, &last_clu, 1);
>> + clu, &last_clu);
>> if (err)
>> return -EIO;
>> -
>> - clu_offset -= fclus;
>> } else {
>> + unsigned int fclus = 0;
>> /* hint information */
>> if (clu_offset > 0 && ei->hint_bmap.off != EXFAT_EOF_CLUSTER &&
>> ei->hint_bmap.off > 0 && clu_offset >= ei->hint_bmap.off) {
>> - clu_offset -= ei->hint_bmap.off;
>> /* hint_bmap.clu should be valid */
>> WARN_ON(ei->hint_bmap.clu < 2);
>> + fclus = ei->hint_bmap.off;
>> *clu = ei->hint_bmap.clu;
>> }
>>
>> - while (clu_offset > 0 && *clu != EXFAT_EOF_CLUSTER) {
>> + while (fclus < clu_offset && *clu != EXFAT_EOF_CLUSTER) {
>> last_clu = *clu;
>> if (exfat_get_next_cluster(sb, clu))
>> return -EIO;
>> - clu_offset--;
>> + fclus++;
>> }
>
> exfat_map_cluster() is only used for files. The code in this 'else' block is never executed and
> can be cleaned up.
Thanks for confirming that. It was confusing me.
I'll clear this up in the next version.
Thanks,
>
>> }
>
next prev parent reply other threads:[~2025-12-31 1:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-30 9:05 Yuezhang.Mo
2025-12-31 1:44 ` Chi Zhiling [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-12-26 9:44 [PATCH v1 0/9] Enable exfat_get_block to support obtaining multiple clusters Chi Zhiling
2025-12-26 9:44 ` [PATCH v1 6/9] exfat: remove unused parameters from exfat_get_cluster 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=29ca8dd9-3a00-490a-8a20-7d187b7ab7ff@163.com \
--to=chizhiling@163.com \
--cc=Yuezhang.Mo@sony.com \
--cc=brauner@kernel.org \
--cc=chizhiling@kylinos.cn \
--cc=jack@suse.cz \
--cc=linkinjeon@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sj1557.seo@samsung.com \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@infradead.org \
/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®