Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6360208rwb; Mon, 5 Dec 2022 11:09:36 -0800 (PST) X-Google-Smtp-Source: AA0mqf727vFA2GnKoCjmVAGlafZnphri3RShvzS8fhs3SKRjKrgp7umAy6/UO03UpChLdKcKiPnM X-Received: by 2002:a17:90a:be0f:b0:219:21c0:8e32 with SMTP id a15-20020a17090abe0f00b0021921c08e32mr46031520pjs.101.1670267375913; Mon, 05 Dec 2022 11:09:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670267375; cv=none; d=google.com; s=arc-20160816; b=COlDFwyybCAOo2BPDcab96ikYwAyTpSSWn6ni9Nb0HdfRqiG5Fs3fODomGyntTilX0 8mekflT/3dBk1gelrTK4kzOd4hkNzl+vRrhL5tcJq06j2g/+H0VGKZg4PbcARXNIEsoe D/ue/Z2PqG22JFNuyUE2H8YUYTD5GoFdkcsrfvdpH5pKd/fjwreTxjvUtlp8LxtGkrpw dApwvtNJEuqcLzrtwaFK/8kHzTyMFA17X/a8MimB/zZaiAJOC1+hEEEybgQchCEe/WGM gmzjjADhoKXQT8UdeFFZHzSoQKR9UZUVUGBH8+nBjVjFURBrW7wXUL2JXLbmRZoKmqqu kDyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QEohlLP3wSThxITbi61W4S3BNYgw99sAQGnTOMCStts=; b=hFNI+qR39vrtYOoyBr1a0EdwjlQoujJ6zptEVQnD8nXRuDuortTJ5ia+7einhCaIEf VWvV8fSjSCLyLq1zEdifzL4iAwh11ds9T2YZa9RAFFpfYFKPU9Ss0g+IxHwyNl2XQl8B cg/ERwAKX5ftsm2dEpHl/Su0X37Y17W5Z9vLmXml6kHUl3qozb5koplM3FriBY58TQOO bxF9dgXGBiRrOkki2BiqHll26fEFE1mTMXM7ktYiZT+rkWtB6HIc3KCh7MvCwnveXvey BK2aC1zsKiH1NWe1Lx0xVi7XvFyhiTJuoRw8ZZ8m9GjyHl73S0gaswUxzKDai9/+Ptzz Tipw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gZdpIlai; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k18-20020a170902c41200b001871fb0906esi16821476plk.585.2022.12.05.11.09.25; Mon, 05 Dec 2022 11:09:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gZdpIlai; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232629AbiLESzH (ORCPT + 80 others); Mon, 5 Dec 2022 13:55:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232276AbiLESy4 (ORCPT ); Mon, 5 Dec 2022 13:54:56 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CF14209B6 for ; Mon, 5 Dec 2022 10:54:52 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 006A961303 for ; Mon, 5 Dec 2022 18:54:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 56943C433B5; Mon, 5 Dec 2022 18:54:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670266491; bh=fMxo9Pxt/+eOWzK6Fcoy958VZcVnlQSUEaPKF5uGEAQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gZdpIlaifDi264JqIhfee++q1eEVwJxU0McwmHRefkSjBeqP5qJsVJbS1qHTHPYxh pdDR58Dl5wcnSgDmOVkBUj4KMuGZDJLR2Ypo56Qm/UaDB2srETKx6SVzXOckbPZ5qD nTbBY1oiHOzhNqrqnc244Aol3HCJaJw3MFKaJI66glujl8TwNh7IHgFZm5sIUA/LqC XivtIAQSlfrjfQPpQ1UCYsHgwuTB2JNWjrqb5J8xB/Dcmi45EX42ZUhk2pLIJZ/fYu uiDFUQcYxJWBlnYqfQ+SvXYvxgpnSFIVrgdZXVOAlZzk2f6snVg6yd76840X2ULINV Wa5+CIX+o7J5w== From: Jaegeuk Kim To: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Cc: Jaegeuk Kim Subject: [PATCH 3/6] f2fs: remove unnecessary __init_extent_tree Date: Mon, 5 Dec 2022 10:54:30 -0800 Message-Id: <20221205185433.3479699-3-jaegeuk@kernel.org> X-Mailer: git-send-email 2.39.0.rc0.267.gcb52ba06e7-goog In-Reply-To: <20221205185433.3479699-1-jaegeuk@kernel.org> References: <20221205185433.3479699-1-jaegeuk@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Added into the caller. Signed-off-by: Jaegeuk Kim --- fs/f2fs/extent_cache.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/fs/f2fs/extent_cache.c b/fs/f2fs/extent_cache.c index 2a8e31e6d518..c6810347e205 100644 --- a/fs/f2fs/extent_cache.c +++ b/fs/f2fs/extent_cache.c @@ -386,21 +386,6 @@ static struct extent_tree *__grab_extent_tree(struct inode *inode) return et; } -static struct extent_node *__init_extent_tree(struct f2fs_sb_info *sbi, - struct extent_tree *et, struct extent_info *ei) -{ - struct rb_node **p = &et->root.rb_root.rb_node; - struct extent_node *en; - - en = __attach_extent_node(sbi, et, ei, NULL, p, true); - if (!en) - return NULL; - - et->largest = en->ei; - et->cached_en = en; - return en; -} - static unsigned int __free_extent_tree(struct f2fs_sb_info *sbi, struct extent_tree *et) { @@ -460,8 +445,12 @@ static void __f2fs_init_extent_tree(struct inode *inode, struct page *ipage) if (atomic_read(&et->node_cnt)) goto out; - en = __init_extent_tree(sbi, et, &ei); + en = __attach_extent_node(sbi, et, &ei, NULL, + &et->root.rb_root.rb_node, true); if (en) { + et->largest = en->ei; + et->cached_en = en; + spin_lock(&sbi->extent_lock); list_add_tail(&en->list, &sbi->extent_list); spin_unlock(&sbi->extent_lock); -- 2.39.0.rc0.267.gcb52ba06e7-goog