From patchwork Tue Nov 15 01:14:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: guo.ziliang@zte.com.cn X-Patchwork-Id: 20121 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2455974wru; Mon, 14 Nov 2022 17:17:07 -0800 (PST) X-Google-Smtp-Source: AA0mqf6J8vpct/wvCGtP74vN8jNey65ad5ph8mrC4UZE4iv9XLTuk8pP4stquCmSaJ236+cu6+Pi X-Received: by 2002:a17:90a:38c1:b0:205:f921:90ff with SMTP id x59-20020a17090a38c100b00205f92190ffmr16203496pjb.156.1668475026915; Mon, 14 Nov 2022 17:17:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668475026; cv=none; d=google.com; s=arc-20160816; b=mrP93C76LmoePFE38Y/BhleWhmt5nnZAvaD1z0YuB59l/ZdZzTqFAnDrLq8GuGNDds lbvR6GIcftJoypyepBHBP7QzlcZs0MG3ynazwTdU1Qy8sLyMCM6HvUtH385w0UvFJ/Mq CI33Tn5wAJHpKxbernuJRNQIDnvjKygPxJjOyAyB79j6kvrGOO9oN5hYNGj4rA7Rr++r dnTFn4oaFxOiEPfyBt02MGwfzMfR9MgTJsjEQoM9N37CPQ65OtWGVQwqjgpkzxK66+Vh pKgMzwDs4xkbQGBH2nkN/heEqSG4nIAnZCGQsAFgbKu93q33PhZkMTg+MnjYGrRQrGxP 6sig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:mime-version:message-id:date; bh=1fJWjdj8JNBQ6sgMx+akMMxmUL//0Fkmk+UQCH2tqV4=; b=Q24slsDJa+6US+AN0kXpk/9313Wi0VPem3qlJi0LBXfJRS9rwxeJTiwwqbRqtPczps BTP46Fg3QkeiQf1XnEdigSjz+B2GqdSAsHAQRGEEXA6kvXSPzxegeASBjZT/XOcx1r0s iV6DW3GcJ+C5AC/vjtXwKRcykK6jMtsIjz2cFJ+bHyEOwaXA9J+vT70PfmXeAgHOlah7 bdTD7xLX930VclbNOn3wK5Wwh5d40KMchGxnh7CfzJFVWitgqCyO5wirEMpzLAS7VMHQ 4isk5yVFrIPrmDcT509C5A9zMZhbxNxa2+5WOy53YZ7VjlpX+MSvvkUN5vEHs7phVRu2 AZSQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n16-20020a637210000000b0046f41385afdsi10197342pgc.118.2022.11.14.17.16.53; Mon, 14 Nov 2022 17:17:06 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232007AbiKOBP1 (ORCPT + 99 others); Mon, 14 Nov 2022 20:15:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231865AbiKOBPV (ORCPT ); Mon, 14 Nov 2022 20:15:21 -0500 Received: from mxct.zte.com.cn (mxct.zte.com.cn [58.251.27.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5511F11C30; Mon, 14 Nov 2022 17:15:20 -0800 (PST) Received: from mxde.zte.com.cn (unknown [10.35.20.121]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mxct.zte.com.cn (FangMail) with ESMTPS id 4NB7X635n1z1DDP; Tue, 15 Nov 2022 09:15:18 +0800 (CST) Received: from mxus.zte.com.cn (unknown [10.207.168.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mxde.zte.com.cn (FangMail) with ESMTPS id 4NB7X25synz9vSp6; Tue, 15 Nov 2022 09:15:14 +0800 (CST) Received: from mxhk.zte.com.cn (unknown [192.168.250.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mxus.zte.com.cn (FangMail) with ESMTPS id 4NB7Wz3TRSz9tyD6; Tue, 15 Nov 2022 09:15:11 +0800 (CST) Received: from mse-fl2.zte.com.cn (unknown [10.5.228.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxhk.zte.com.cn (FangMail) with ESMTPS id 4NB7Wv6x4zz8RV7J; Tue, 15 Nov 2022 09:15:07 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.40.50]) by mse-fl2.zte.com.cn with SMTP id 2AF1Etol097501; Tue, 15 Nov 2022 09:14:55 +0800 (+08) (envelope-from guo.ziliang@zte.com.cn) Received: from mapi (xaxapp03[null]) by mapi (Zmail) with MAPI id mid32; Tue, 15 Nov 2022 09:14:56 +0800 (CST) Date: Tue, 15 Nov 2022 09:14:56 +0800 (CST) X-Zmail-TransId: 2afb6372e810ffffffffb7f1a3c7 X-Mailer: Zmail v1.0 Message-ID: <202211150914564821972@zte.com.cn> Mime-Version: 1.0 From: To: , Cc: , , , Subject: =?utf-8?q?=5BPATCH_linux-next=5D_btrfs=3A_remove_redundant_ret_vari?= =?utf-8?q?able_in_delete=5Fv1=5Fspace=5Fcache?= X-MAIL: mse-fl2.zte.com.cn 2AF1Etol097501 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.251.14.novalocal with ID 6372E825.001 by FangMail milter! X-FangMail-Envelope: 1668474918/4NB7X635n1z1DDP/6372E825.001/10.35.20.121/[10.35.20.121]/mxde.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 6372E825.001/4NB7X635n1z1DDP X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749522869339761807?= X-GMAIL-MSGID: =?utf-8?q?1749522869339761807?= From: guo ziliang Return value from delete_block_group_cache() directly instead of taking this in another redundant variable. Signed-off-by: guo ziliang --- fs/btrfs/relocation.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 1.8.3.1 diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 56c8afa..d7f76cf 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -3374,7 +3374,6 @@ static int delete_v1_space_cache(struct extent_buffer *leaf, struct btrfs_key key; bool found = false; int i; - int ret; if (btrfs_header_owner(leaf) != BTRFS_ROOT_TREE_OBJECTID) return 0; @@ -3398,9 +3397,8 @@ static int delete_v1_space_cache(struct extent_buffer *leaf, } if (!found) return -ENOENT; - ret = delete_block_group_cache(leaf->fs_info, block_group, NULL, + return delete_block_group_cache(leaf->fs_info, block_group, NULL, space_cache_ino); - return ret; } /*