Received: by 10.213.65.68 with SMTP id h4csp1206423imn; Wed, 21 Mar 2018 05:26:55 -0700 (PDT) X-Google-Smtp-Source: AG47ELtrw28bB+MmgWkwLaXxclm7jb0Fr6uDODpb/p/vFlQR3mWXxAHGg7PRqeo4KEg15nTUn+Z0 X-Received: by 10.99.114.86 with SMTP id c22mr14610449pgn.72.1521635215238; Wed, 21 Mar 2018 05:26:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521635215; cv=none; d=google.com; s=arc-20160816; b=auj7hCk6JyjoBUz9b7zOaxNRzqhRb5jLSDP8i655SKaL2tIerWU3dK2twYDEH9Kqvx 5JgtBrg5fDaizryUkjHvA1VI7cn6a+opCfuO8+GazfE2SKr4DZ1Up/cM1Zej1fOlM4HC jAkGRC6Wws+rWs68DESwfRdOqQzb7bQlYrgQxmJdCtk7MMu/X8QDCwt8MlFPLMhHJi0P bo0gdRbU1HlAw0SzsU3U63dpf3tR7U9MNa+TF7+DEt1wyfZdqHttanBAsyndESptNxWo /2wm44Ws32kKfRBCxRivJ3iOGU3B4ZpZmi6zVwFB45DhFT4kMVof9v2fHKOafpSUoEHH 1d/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=FxKWajlLFiZWHzVdtjSxWZKaZXOvJp093HkXFhxBWx8=; b=Axq/sgr46RjC3m3ZNqPZ05YeOKzAz7iHVo03HhtZ0+z9LJirKtnFyDE1JRvqN76V8F 7tiqX3nwOSU7/VThx1nX0qSCCQ/X0MVFny+krNnrZt9IIpQQ+C5a0f4H9dNQin5j8IAc 15YBk0WgXCuWYBiluua/dsr3EBp4uwdZx78YuM7RVADC6qcQu4isTvh+FcimjinxEA0U l7SW6uh9ZL0Cqggm+q9fnEPYBJZteDpWf3PnT0phggpTNVy8YO3y8XmaQNMFNdq7+IrR K2dWEVc2VyhDntSQrtPWvq13O9+216QZAGJ80CES9xnT0Lhq7dgutfd1TN0xuIGO7z/C 5qCg== 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 r4-v6si3718353plo.128.2018.03.21.05.26.40; Wed, 21 Mar 2018 05:26:55 -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 S1751707AbeCUMZt (ORCPT + 99 others); Wed, 21 Mar 2018 08:25:49 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:41612 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751531AbeCUMZs (ORCPT ); Wed, 21 Mar 2018 08:25:48 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 497C2725FCAA4; Wed, 21 Mar 2018 20:25:45 +0800 (CST) Received: from huawei.com (10.113.189.234) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.361.1; Wed, 21 Mar 2018 20:25:37 +0800 From: Yunlong Song To: , , , , CC: , , , , , Subject: [PATCH] f2fs: no need to initialize zero value for GFP_F2FS_ZERO Date: Wed, 21 Mar 2018 20:25:31 +0800 Message-ID: <1521635131-137071-1-git-send-email-yunlong.song@huawei.com> X-Mailer: git-send-email 1.8.5.2 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.113.189.234] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); 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; -- 1.8.5.2