lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <29ca8dd9-3a00-490a-8a20-7d187b7ab7ff@163.com>
Date: Wed, 31 Dec 2025 09:44:49 +0800
From: Chi Zhiling <chizhiling@....com>
To: "Yuezhang.Mo@...y.com" <Yuezhang.Mo@...y.com>
Cc: "brauner@...nel.org" <brauner@...nel.org>,
 "chizhiling@...inos.cn" <chizhiling@...inos.cn>, "jack@...e.cz"
 <jack@...e.cz>, "linkinjeon@...nel.org" <linkinjeon@...nel.org>,
 "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
 "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
 "sj1557.seo@...sung.com" <sj1557.seo@...sung.com>,
 "viro@...iv.linux.org.uk" <viro@...iv.linux.org.uk>,
 "willy@...radead.org" <willy@...radead.org>
Subject: Re: [PATCH v1 6/9] exfat: remove unused parameters from
 exfat_get_cluster

On 12/30/25 17:05, Yuezhang.Mo@...y.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,

> 
>>        }
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ