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>] [day] [month] [year] [list]
Message-ID:
 <PUZPR04MB6316EAFF1D1D002551408CD181BCA@PUZPR04MB6316.apcprd04.prod.outlook.com>
Date: Tue, 30 Dec 2025 09:05:56 +0000
From: "Yuezhang.Mo@...y.com" <Yuezhang.Mo@...y.com>
To: "chizhiling@....com" <chizhiling@....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>,
        "Yuezhang.Mo@...y.com" <Yuezhang.Mo@...y.com>
Subject: Re: [PATCH v1 6/9] exfat: remove unused parameters from
 exfat_get_cluster

> 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.

>       }


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ