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: <Yd3UZyhGiACHgBah@carbon.dhcp.thefacebook.com>
Date:   Tue, 11 Jan 2022 11:03:03 -0800
From:   Roman Gushchin <guro@...com>
To:     Muchun Song <songmuchun@...edance.com>
CC:     <willy@...radead.org>, <akpm@...ux-foundation.org>,
        <hannes@...xchg.org>, <mhocko@...nel.org>,
        <vdavydov.dev@...il.com>, <shakeelb@...gle.com>,
        <shy828301@...il.com>, <alexs@...nel.org>,
        <richard.weiyang@...il.com>, <david@...morbit.com>,
        <trond.myklebust@...merspace.com>, <anna.schumaker@...app.com>,
        <jaegeuk@...nel.org>, <chao@...nel.org>,
        <kari.argillander@...il.com>, <linux-fsdevel@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <linux-mm@...ck.org>,
        <linux-nfs@...r.kernel.org>, <zhengqi.arch@...edance.com>,
        <duanxiongchun@...edance.com>, <fam.zheng@...edance.com>,
        <smuchun@...il.com>
Subject: Re: [PATCH v5 05/16] f2fs: allocate inode by using alloc_inode_sb()

On Mon, Dec 20, 2021 at 04:56:38PM +0800, Muchun Song wrote:
> The inode allocation is supposed to use alloc_inode_sb(), so convert
> kmem_cache_alloc() to alloc_inode_sb().
> 
> Signed-off-by: Muchun Song <songmuchun@...edance.com>

LGTM

Acked-by: Roman Gushchin <guro@...com>

> ---
>  fs/f2fs/super.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
> index 040b6d02e1d8..6cdbf520b435 100644
> --- a/fs/f2fs/super.c
> +++ b/fs/f2fs/super.c
> @@ -1311,8 +1311,12 @@ static struct inode *f2fs_alloc_inode(struct super_block *sb)
>  {
>  	struct f2fs_inode_info *fi;
>  
> -	fi = f2fs_kmem_cache_alloc(f2fs_inode_cachep,
> -				GFP_F2FS_ZERO, false, F2FS_SB(sb));
> +	if (time_to_inject(F2FS_SB(sb), FAULT_SLAB_ALLOC)) {
> +		f2fs_show_injection_info(F2FS_SB(sb), FAULT_SLAB_ALLOC);
> +		return NULL;
> +	}
> +
> +	fi = alloc_inode_sb(sb, f2fs_inode_cachep, GFP_F2FS_ZERO);
>  	if (!fi)
>  		return NULL;
>  
> -- 
> 2.11.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ