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: 13043050 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2ED47C433FE for ; Tue, 15 Nov 2022 01:15:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231927AbiKOBPX (ORCPT ); Mon, 14 Nov 2022 20:15:23 -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 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org 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; } /*