From patchwork Tue Mar 19 14:55:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13596745 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E8EFA54FA0 for ; Tue, 19 Mar 2024 14:57:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.165.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860266; cv=fail; b=UfsRetAUr/iaEiyUJE2V23MsQEluxwuHqMvzUXH01YinVaMKAWt2laCtzQ1lAoXnx9uW8swd+cEuk42LqjEicHsLeoZBDMNyIqkbIA/aWv6zQREvTXOojM9zk10gULEJKiATjPmh6oacE8Y3M7CZ82lTmOIYA0zM3kNZNnUQXSg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860266; c=relaxed/simple; bh=/GDXI62QwS0c4AntUuv1/X2b3w4mEM6TRIDOM5E0jxo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=jFJH9lYuaYAYA4XoKzjiW1qFiq2RoTIA/nxWdEjo/o15PZkE2VykGGLH4iv1H4m0iJwnrNX/j+po4vGgxZM1jaiGIjkvkhjzvSiXb4QiTJb8kHwBD/55qkdwS7XqFxhemndQ28oS3qhBhWL3qkpS8hgUmdHQZP2fz2i4jFDNoPM= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=ZLbvBOFZ; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=HaiKEOpt; arc=fail smtp.client-ip=205.220.165.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="ZLbvBOFZ"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="HaiKEOpt" Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 42JAHn50005071 for ; Tue, 19 Mar 2024 14:57:44 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-11-20; bh=70h08AN5Z58xuvG51BFumAwBhGIlU5smnWNfJBkJhhQ=; b=ZLbvBOFZEZsW5tvqHTx2bLSxCRGkveS2caHbQdo4fnB3OxCMx6Wva1v+aP60O9jiD2kL d2zshsfxmhD3PF+srZmdbSSyBZT4VD5eSGm+9h6xtVtG54tD7a+/4fGzs3tYdgeD3N2w 4rspy7IulnEuL5X/pbtR5bmEhKQ6kZm0JUTwVD8HV5YGdpSr9glpvREj/SUDypFi8fUi 7fsRtGgGtwpDNHADyCs5SRwNaa7hgokKiCfatnFdKp2EJR9BxYHscxwfPZgisqzn7QWO vr+hjckhE4f+hHmJJPUs1/mTacavV0Aw4f/tGjKmCZ9gYUEXDIxXfeQrDUrIX4pLsCmZ 3w== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ww3aadngq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:57:43 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 42JEZR3b015805 for ; Tue, 19 Mar 2024 14:57:43 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2100.outbound.protection.outlook.com [104.47.70.100]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3ww1v6v7df-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:57:43 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EGJC18Ax2YMkqpzZHvxd7+v8t72PeQnGWp4LnxNixeuXodV6gKLY77LmqnlKWl5+M5vFny/GILYEBxE2mNlFDF2SnsEIYKta5uMSZI0GRyiI+RlMtLqW98BIFKFUio4wOaulbAN9I7BX17wg2un3p8U30nmOXT0VyHx8X0lq68n6WDQKmYWB32ILTRd6U1Zx7XsLFN8c0pXpsd5mRfhm73ne52IrxX38E5X34TCQiBOLBFgiojSwVyVkpbGyKwU8558tg5T7u9JGlbDmAVrELQKrMD5WYSJEH/n7OA17s4djuDDZnKN0Uu/f9X7qkgUYJGpgg/eaiZ7dnSKFJW/3qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=70h08AN5Z58xuvG51BFumAwBhGIlU5smnWNfJBkJhhQ=; b=PdJhDU+m6/6xfbgK/xHcv3w/bHQ8nQR2G1S/vJZCSqnSDGHFerGWHrR4vfnBDc7YcqrjKO2TVpor0bOSB7NFiEwHnIseV3x5dVdW1lD9HbRoLvAnWfiO0psQm74YSVU0bge60YDR1SgQsZw9IQmuY3vmXhGfF2OskwzTyHhPAJ9duilYraPNSeL1w6X8yPjcr/kTtG9DOnnv8NWIEmS2PxE4cF1jtFB2ysDobI37eef6Y/mdJKynfbNoJ4VCxXnsTP+q6H+3MQXM5MOPW/Oz17Uapiqsqem6aoXuugdpX+MXaHuCS/7PeEUIewU6pFjVbyxyyc3HMV9lMv0g5I/qSA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=70h08AN5Z58xuvG51BFumAwBhGIlU5smnWNfJBkJhhQ=; b=HaiKEOptsEmtTDt/TSUj76aOx4WNeYJog7JGMhSR+M0QXC9aHA8nIPZ1wIsTQGCyMXyQ9R+agF9VpZPHxVlxDFQTko9QNpV/MYkdjMnvMEsdsBP46YCocPJD22nbHDwvsFBpjvM/Y6aND/Iw71B5uTCKvHBK5/zQs+eer5aMGzc= Received: from PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) by PH8PR10MB6479.namprd10.prod.outlook.com (2603:10b6:510:22d::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.34; Tue, 19 Mar 2024 14:57:40 +0000 Received: from PH0PR10MB5706.namprd10.prod.outlook.com ([fe80::814:3d5c:443b:17b]) by PH0PR10MB5706.namprd10.prod.outlook.com ([fe80::814:3d5c:443b:17b%7]) with mapi id 15.20.7386.025; Tue, 19 Mar 2024 14:57:40 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 14/29] btrfs: build_backref_tree rename err to ret and ret to ret2 Date: Tue, 19 Mar 2024 20:25:22 +0530 Message-ID: X-Mailer: git-send-email 2.42.0 In-Reply-To: References: X-ClientProxiedBy: MA0PR01CA0097.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a01:af::14) To PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) Precedence: bulk X-Mailing-List: linux-btrfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR10MB5706:EE_|PH8PR10MB6479:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Y1siiyrKimSPVRybf10JtVKXDi0+nkiBCuXPwyKKlplyJPcJv4GppehxgmhGSzBprnZBiwxY9stQCJ8PbbN5Vrrcg/IdUdDlG8D5U+M9s+UcuqKeO1aS7+cOjCI4q4dh8dVWYIlw2pGxFoSP9HxxXiqIXrRPRTyuPbVt2ZcoXKsb3x5DYwNATtfBUs2i0CXOzxrrzrWDP54N0oO3OOO12clEJF5O8ziCdpAOrp6ppQMKRUEOWBaP9fm11DL8yb+wOXPqJTwmCWSNVyfSDUT2DOtYqv9I0iS1R3cxmkBSZk2OJaw2zM/gTLeEkjZ+Tl05l2GN8ORtoMZ6meK3F9gw0J0/hAq3shUWUe1B4ig/0/+Ev/OFmbAfNTA2Ii5YSVumld6mmjpzicpq0a3hm2uTP5qB7lJkJvp6csc1ivymd5eogrmc2Qn5Ey/9JNn+Z7BQf2Fcm7bRTf7cTrzQJp5+shLXwUAVXBDh2GiezDdNa6T4ypDuR/H1JEXfl4BHmxhiIjeJpRPQ87VK5/28cByaNJyv6paBwtpGfDpyMWcr5j3ywQPzNcUjLgprg4DwB4w7CQZyce1An6u/4wNBmlO1aZWf90ShFRe3AzG9pPx7nHr3SO/81HTIL5MZ4rjTNjlPTRzM9/Jct9+bsWw5D3Dd60HpNnFzOGK4oKurG2//YNU= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR10MB5706.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366007)(1800799015)(376005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: d1FNK2xacmXEUuaZQPWr8yuHZ7mKr8s2dbd0qx9dhqzPy1tDkdyrOdqCAa8pcm8HpJlUtlpU2z5ZQ/gvmoz0bGGyx73j7Qx+PT1bKCs9aIAsrWVmNJvH1Ya6lQxoOI0DQSSQ9W9vGl9NcIMmLHtrIUo/hNY4/gak2s3SwST5aBopykIXsDyTUkTfbF2jSjzS3BAouPFBt1qthud3UYl45MC37glfRgEal6d4tyhXsRVoJB+ZPPEmIN4AuZhwUXf8G7/XGE4ywtcxhi3pOoLBRJNAjAKzR2Xs089vgY5J86LyleqJI4clslAzG4Z9KD0SkCHSHU7w5dfLTilNqwhKZRtCglufPjBh212k0mp4nVLuoAgCdu/CwNCJ9QXudJ1iouafu2utVX/qMvojhgKgNHCcqHdGQSws8Ffs/2rWiKMzEem5/X94yzYVgyCbbEfXabGg20twjjkr5YwJDNm3J5//lqajzo0GS/UwWK3F1EJYzK8GGAMA+pKg2L68WmY19ABhY5pgdRDhVSqW2mh8W9ezofJVTWX/oZqQiaaem5ldmkzpPWeQVOnzGGMY4UodMbFw5o8fM7p8M25mm66GbMJLwcOlmVC67iUTEvr6BjtMKNLKR7iALtb3imOMlX01smPuRdvux+qC32MRuvstzWFx7DRUKWpnCH8YP3DyD4nn9j9Imakmc2h16A3TL75jeN6D73eB0SG+/rGg7sC4OeHQp30XsB1wXA2AI1lC2GJxVCgN1GOCDrxRNHoFENZ0W1YgFWLtaa2zy5+GdH6XYcwcpDpsnYlOadqJ+6ewMASItrLQOrMlP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Z3MOHzssuviDq20q4yPgYhkRMGI8Tt6RKd9CKYpKVhcQW3SWV3dfXQMFcE0LI2bfN4x8ZFqNO1BgZMngSIyFPuO4/wzsFYCyLsONz1YS9S5kmGX6R2Enx4SC88fpKdq+gzEguGnS5pHxljRaZfZAM5u/CiB9uxKzuQFFEGxVZCDNQvBr/x+0xwhAM8biC/W+OJ9MvSxCbm74ongkWW6KZQb47h5+HJdXb62M+0VZZ9JWGOQEXYhiUOqQgpmBG3IcXkTl5xTB+C7xKhw8x5r7zghXvM7jLdchhgHLwgINyYRS61T9NuJwHxw9DqsxaDsSJa8478P95U/OBXvoe0Q4J9R/eTvd3rO43oisk6FuUvwZcXZZ3NwSFEzvr8ciLiJ312xKy8bOyHLo0yMwSt7tKTK9kPouKXvKVc44zc8krQ/X3IVk42NjzJM5uGOC2kKpOZbJQGP6a0ZwnVm4= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: d26410da-930b-479f-5fbb-08dc4824ec88 X-MS-Exchange-CrossTenant-AuthSource: PH0PR10MB5706.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Mar 2024 14:57:40.7528 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: xNcPCxCYy+dr+mfMFBdwGV7nxK9XbwyWaSgUQFPK8cl99KG6WHF5RHZSGMLuHMbUy+ogP8K2920buIhDGW7AbQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR10MB6479 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-19_04,2024-03-18_03,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 mlxscore=0 spamscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2403140000 definitions=main-2403190113 X-Proofpoint-ORIG-GUID: lpYSJcbuXl7Qvbgk5N5aX4yxBgEjvULw X-Proofpoint-GUID: lpYSJcbuXl7Qvbgk5N5aX4yxBgEjvULw Code sytle fix in the function build_backref_tree(). Signed-off-by: Anand Jain --- fs/btrfs/relocation.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index f96f267fb4aa..535d5657777b 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -472,21 +472,21 @@ static noinline_for_stack struct btrfs_backref_node *build_backref_tree( struct btrfs_backref_node *cur; struct btrfs_backref_node *node = NULL; struct btrfs_backref_edge *edge; - int ret; - int err = 0; + int ret = 0; + int ret2; iter = btrfs_backref_iter_alloc(rc->extent_root->fs_info); if (!iter) return ERR_PTR(-ENOMEM); path = btrfs_alloc_path(); if (!path) { - err = -ENOMEM; + ret = -ENOMEM; goto out; } node = btrfs_backref_alloc_node(cache, bytenr, level); if (!node) { - err = -ENOMEM; + ret = -ENOMEM; goto out; } @@ -495,10 +495,10 @@ static noinline_for_stack struct btrfs_backref_node *build_backref_tree( /* Breadth-first search to build backref cache */ do { - ret = btrfs_backref_add_tree_node(trans, cache, path, iter, + ret2 = btrfs_backref_add_tree_node(trans, cache, path, iter, node_key, cur); - if (ret < 0) { - err = ret; + if (ret2 < 0) { + ret = ret2; goto out; } edge = list_first_entry_or_null(&cache->pending_edge, @@ -514,9 +514,9 @@ static noinline_for_stack struct btrfs_backref_node *build_backref_tree( } while (edge); /* Finish the upper linkage of newly added edges/nodes */ - ret = btrfs_backref_finish_upper_links(cache, node); - if (ret < 0) { - err = ret; + ret2 = btrfs_backref_finish_upper_links(cache, node); + if (ret2 < 0) { + ret = ret2; goto out; } @@ -526,9 +526,9 @@ static noinline_for_stack struct btrfs_backref_node *build_backref_tree( btrfs_free_path(iter->path); kfree(iter); btrfs_free_path(path); - if (err) { + if (ret) { btrfs_backref_error_cleanup(cache, node); - return ERR_PTR(err); + return ERR_PTR(ret); } ASSERT(!node || !node->detached); ASSERT(list_empty(&cache->useless_node) &&