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] [thread-next>] [day] [month] [year] [list]
Message-ID: <YgNy121L0gYjqj6K@B-P7TQMD6M-0146.local>
Date:   Wed, 9 Feb 2022 15:52:55 +0800
From:   Gao Xiang <hsiangkao@...ux.alibaba.com>
To:     Jeffle Xu <jefflexu@...ux.alibaba.com>
Cc:     dhowells@...hat.com, linux-cachefs@...hat.com, xiang@...nel.org,
        chao@...nel.org, linux-erofs@...ts.ozlabs.org,
        torvalds@...ux-foundation.org, gregkh@...uxfoundation.org,
        willy@...radead.org, linux-fsdevel@...r.kernel.org,
        joseph.qi@...ux.alibaba.com, bo.liu@...ux.alibaba.com,
        tao.peng@...ux.alibaba.com, gerry@...ux.alibaba.com,
        eguan@...ux.alibaba.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 06/22] erofs: use meta buffers for
 erofs_read_superblock()

On Wed, Feb 09, 2022 at 02:00:52PM +0800, Jeffle Xu wrote:
> The only change is that, meta buffers read cache page without __GFP_FS
> flag, which shall not matter.
> 
> Signed-off-by: Jeffle Xu <jefflexu@...ux.alibaba.com>

Reviewed-by: Gao Xiang <hsiangkao@...ux.alibaba.com>

(If this patchset left behind anyway, I will submit this cleanup
 independently for the next cycle.)

Thanks,
Gao Xiang

> ---
>  fs/erofs/super.c | 13 +++++--------
>  1 file changed, 5 insertions(+), 8 deletions(-)
> 
> diff --git a/fs/erofs/super.c b/fs/erofs/super.c
> index 915eefe0d7e2..12755217631f 100644
> --- a/fs/erofs/super.c
> +++ b/fs/erofs/super.c
> @@ -281,21 +281,19 @@ static int erofs_init_devices(struct super_block *sb,
>  static int erofs_read_superblock(struct super_block *sb)
>  {
>  	struct erofs_sb_info *sbi;
> -	struct page *page;
> +	struct erofs_buf buf = __EROFS_BUF_INITIALIZER;
>  	struct erofs_super_block *dsb;
>  	unsigned int blkszbits;
>  	void *data;
>  	int ret;
>  
> -	page = read_mapping_page(sb->s_bdev->bd_inode->i_mapping, 0, NULL);
> -	if (IS_ERR(page)) {
> +	data = erofs_read_metabuf(&buf, sb, 0, EROFS_KMAP);
> +	if (IS_ERR(data)) {
>  		erofs_err(sb, "cannot read erofs superblock");
> -		return PTR_ERR(page);
> +		return PTR_ERR(data);
>  	}
>  
>  	sbi = EROFS_SB(sb);
> -
> -	data = kmap(page);
>  	dsb = (struct erofs_super_block *)(data + EROFS_SUPER_OFFSET);
>  
>  	ret = -EINVAL;
> @@ -365,8 +363,7 @@ static int erofs_read_superblock(struct super_block *sb)
>  	if (erofs_sb_has_ztailpacking(sbi))
>  		erofs_info(sb, "EXPERIMENTAL compressed inline data feature in use. Use at your own risk!");
>  out:
> -	kunmap(page);
> -	put_page(page);
> +	erofs_put_metabuf(&buf);
>  	return ret;
>  }
>  
> -- 
> 2.27.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ