Received: by 10.213.65.68 with SMTP id h4csp261053imn; Wed, 21 Mar 2018 18:12:25 -0700 (PDT) X-Google-Smtp-Source: AG47ELtEGQ5RaP9I8c48p8T+f3bcCR93Cs8z/yGrZJKyPfrQg3d/eiQcWwSvKwvh78vcVfnJO/Kr X-Received: by 10.101.92.138 with SMTP id a10mr16470366pgt.129.1521681145544; Wed, 21 Mar 2018 18:12:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521681145; cv=none; d=google.com; s=arc-20160816; b=RFBH0Hzj8GJZin95yphGWTAIvl3A4A7Huy/HG59aEMpwFFbjQdlkGbgSv1J62akxBf +9V+XqJo62O0hkSbIzc+BMDm1WCoysp0QYQfF32lO6F5RZ3LaUlR/EeWUCTJeHx5qVnI kl2TSbYJ4AqLbiV8mv6jC9HuucTg4hgsi69LiWx7jZWkcUVDR83Y2yc6fxOlsWvtF0EG H0tzPTkyyLSG2vMjv9dq+1SlTWxURtunCUvR3nQb5usJUJOCJPoRDBlvW6hZ6p72F9c2 RxOiyYZfBq1Uxz5+e64ZYsY1dY1glSKFNw7mVKFsTe78t4gYYtYNUjDRx5bCOhDuUvdp GlGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=fE0DVXBUIAR7U+YYl7rjusr9lo20fz0BqWc1kQKBHdw=; b=xNo/RdAkzR8ZGEbMjNvQdibi3F0+gI92PJ2R7Uu6tmvXSo9l6Jw3nQgxLSBJ3jCiep yvrylT5hfPWkIr7qGae6Wt8/oyQQExfAOAUX9XAEricx37LwNngRbAvnyW/fyP+L7L5a jSxuUkxzPUhRGgt3rxiQE9TRVwF3Cz6OxUN3FuO0Coj74aSzPnAPh60OLYRnjzNtqEXG tH9anj9R/LgHVpZwyYU7aBErmm4233VSU0gYKm/d/IWrD6SRRvWAkQmmbLry2mB84qNy IOZBBo3jRAlL76gd9rcK3MIbiVValxw8gpXYqDk6fyzSD9lk3THGPXMdpEPwm7sfa7AZ 6QMQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x75si3994387pfa.74.2018.03.21.18.12.10; Wed, 21 Mar 2018 18:12:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752382AbeCVBLR (ORCPT + 99 others); Wed, 21 Mar 2018 21:11:17 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:48872 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752105AbeCVBLQ (ORCPT ); Wed, 21 Mar 2018 21:11:16 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 3A87CBE63B075; Thu, 22 Mar 2018 09:11:12 +0800 (CST) Received: from [127.0.0.1] (10.134.22.195) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.361.1; Thu, 22 Mar 2018 09:11:03 +0800 Subject: Re: [PATCH] f2fs: no need to initialize zero value for GFP_F2FS_ZERO To: Yunlong Song , , , CC: , , , , , References: <1521635131-137071-1-git-send-email-yunlong.song@huawei.com> From: Chao Yu Message-ID: <2bd0b193-c2de-503e-0379-cf4abe645bd9@huawei.com> Date: Thu, 22 Mar 2018 09:11:04 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <1521635131-137071-1-git-send-email-yunlong.song@huawei.com> Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.134.22.195] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018/3/21 20:25, Yunlong Song wrote: > Since f2fs_inode_info is allocated with flag GFP_F2FS_ZERO, so we do not > need to initialize zero value for its member any more. > > Signed-off-by: Yunlong Song > --- > fs/f2fs/super.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c > index 0c1fe9b..3a7fa03 100644 > --- a/fs/f2fs/super.c > +++ b/fs/f2fs/super.c > @@ -825,9 +825,7 @@ static struct inode *f2fs_alloc_inode(struct super_block *sb) > init_once((void *) fi); > > /* Initialize f2fs-specific inode info */ > - atomic_set(&fi->dirty_pages, 0); We'd better to keep atomic_set function as it is since how it initialize .dirty_pages field is completely depend on locking sub module itself. Thanks, > fi->i_current_depth = 1; > - fi->i_advise = 0; > init_rwsem(&fi->i_sem); > INIT_LIST_HEAD(&fi->dirty_list); > INIT_LIST_HEAD(&fi->gdirty_list); > @@ -839,10 +837,6 @@ static struct inode *f2fs_alloc_inode(struct super_block *sb) > init_rwsem(&fi->i_mmap_sem); > init_rwsem(&fi->i_xattr_sem); > > -#ifdef CONFIG_QUOTA > - memset(&fi->i_dquot, 0, sizeof(fi->i_dquot)); > - fi->i_reserved_quota = 0; > -#endif > /* Will be used by directory only */ > fi->i_dir_level = F2FS_SB(sb)->dir_level; > >