From patchwork Tue Mar 19 14:55:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13596732 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.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 0EBCF6166B for ; Tue, 19 Mar 2024 14:56:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860187; cv=fail; b=eFlVI3swNmRFvVe1lLbQuWWL2PrtlQq0+UUgOtshWBx1LV6O6XCCpOhYt1gSQVFwFm1IwjH1CXSKoaVmlpDnTFYPM8SLXFpxxcBpQ+yXYxAkEpaKJU71u9mNmi/8Yd8CYx774EjDg8SoDXuCeXR9Slk11j3PmRST8jSybZ0uwJI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860187; c=relaxed/simple; bh=04DxCu+hGrskb1YTJ+N+s42DZhbyncZKZW4xZ71oWG8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=hdBbZ9QG+5vdP0c7oMMriCua6mov0q/QFJpmwX3C9NwPgDB/GOnkykpMGxna3na3nOTV+38dtngrQ3G1xtpZQb0P5XrW0zksbvdgC/nWtfMKaK43wxiprBIjDO9fI9v8GekX1lEMisuoAZSl6VekyhnOEWzMXXWuAK5ZiGkcu0I= 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=S6PnkHAZ; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=mKbLF8zK; arc=fail smtp.client-ip=205.220.177.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="S6PnkHAZ"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="mKbLF8zK" Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 42JAHItg005078 for ; Tue, 19 Mar 2024 14:56:24 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=qv9itqghkrQkJKvneUBcu4udZY7obA0VCMZv7sQYqUs=; b=S6PnkHAZZxNuk/OZoeOHzVv8ns4/L7RcZEVLnIDToyTqrmRyCv9zG/FPtM9gbUi66PgU jb8AGAKNuqR1rIJBNM73i5BSIZ1nQObcPXpeJdbEwSKaDie88+x8UaA0AKdjOetvWYzx QGORTfVsKLzyTiXe1nhFmrfDU1S9PfYXhGCcvQIa1iNM4iQ+m9w8dwdeZd7/NV67KROA OEyCwkTMobMEGQ3Lyl6IMBvl6DVogJthhHA23NSjT+BgEkWuCerTr6MdKxkVjBRwd1LJ Ly6GOyJVcxMncLB1qcNreooWUkqBY+7xEuqE3fVMaHPxKA1RzdmHiu9pkadG9FP8uoaC 7Q== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ww31tnsek-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:56:24 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 42JDfYhA007509 for ; Tue, 19 Mar 2024 14:56:23 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2041.outbound.protection.outlook.com [104.47.66.41]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3ww1v6cm0u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:56:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GpUU64sEuEAX5ddBWLKba0uBThxKy5gnSEBtxYUbDZ8OwvBTSOgDS66+/rqHy5Sotwa3FUyr2T+BdtSsSsIfEHVUds74Uq/vh5h6+0nLuiN/0ujsHtUValffLP1fQagdNTVsGHrmngfcR9ZDo5tX61OmZAkZsVUUa69m4Kfujmc+mgltmpzDnd+AZKQigENq8NpsBDd9cIe1pbUUFSvIwRLfawJfXT7tSFkfceQ6q0hvqbUcPoO7xVKCva13SSjMvZ2qIXS6vnTDQ5CP/TERkJoS3A4K1aRHA03X9EHQ4stQhYjRamBeI8zgJB25GonVVPSeUExMglXeBXHQLSC/oA== 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=qv9itqghkrQkJKvneUBcu4udZY7obA0VCMZv7sQYqUs=; b=avYtDBX13LcwjqyLOm6AXpZSD/WPts+nI861r6mZCHgahEg2km0zqZcBhdvhU96fhqqbsftJIsCkbYGg0b08LQ+2FPk1N5hUxDoEGLN8gcFw98hkwh4u47oiksfgdTfXi4lTSS2RhtMmeiRjte6QhX6slbn0iYUqSjOQvR5aE4DHKBuCw6h7pz3PcxTqNGjbMh29B9dc0Xv9Ye8QB7P9Nj4OBKR1rmsQvmkKK2U5PU6e8PGVnltrl8rJpwtubJt1x3cidcmVjFfHmyfL4GewcbqKeL8qwIh3i0YWuRDZcvleRmS4xmZSrMdtjJvmnQ2As+/9zlpTU8HLKiDdY0letg== 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=qv9itqghkrQkJKvneUBcu4udZY7obA0VCMZv7sQYqUs=; b=mKbLF8zK8aTMhtGkVc8l2GA+TeFh3abTmPpBqhvv3MJz2p0F/89PZtgOAU/1tVqSEgXvUtrygQG32oNcyz33TQxLeUDujEksOr3foJFFUT00D9qZxVc+L0lKbgAXFQ7QIotQSW8CMXLXPyHAibLKKQ91RRTEhj0Z8/Mve7CQUKA= Received: from PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) by CY5PR10MB6120.namprd10.prod.outlook.com (2603:10b6:930:34::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.27; Tue, 19 Mar 2024 14:56:21 +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:56:21 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 01/29] btrfs: btrfs_cleanup_fs_roots rename ret to ret2 and err to ret Date: Tue, 19 Mar 2024 20:25:09 +0530 Message-ID: X-Mailer: git-send-email 2.42.0 In-Reply-To: References: X-ClientProxiedBy: MA0PR01CA0054.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a01:ac::6) 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_|CY5PR10MB6120:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gpTR3ilVJaaMXz6BxpX9ugIoAAbpjwwAYva6sO/79jBJ7OIB5YDb694TjlhyclHAU7sxgOWf8h/K1AeVRoik6mDkzUa6DGNqZH1QB3WBkXVZxqFmI39glE+8tgEYKcWtfSRlUygNXupcKcjEzEWANjs8ia2OeePlVVb7oodmuY7jLn7JkUZv+CCNSUemMb/qg59YfIo+a16qFe4Sd03SIIU4xpPqVtu772SPjcovyh8IVu46XYGEKQXR18NpIlOaoFfOBce+g/oB9JY+BBc7WEYDCRx69jrwnagjLZK2YZkFZV4mK4sTq/7FaQ/lk6wKOVpgfuE1jTrRWm3MLOM5+oH2IpG98QoGZushyUD/RC33n1mv8VL4S4+gsQTT8tTs3YhyyJ3dg8bTTCi4OpM1sDV/pe0PybbekYrdOYyGqVnxnhBXkksvjvi9eTvQs7n+PWYKalMeKoa0Q5uPWJ8k4qFHub1wltvgx5VJRuunFCR+85h3+9drsjftZIyM3qG8BqYbQ1roARorXtptcN6tcdL6G5vOfjBY74Fwr1+LychgIwYdw1RBDAn1g4hALcEP+jdw6hplHJkHDTYE+/WUhFeIoj2vPZuXc1Qx8c8tIgRA+E/6lFn3AWP6SDPi+y1y4581lDfV9i3yKx0zIA+/M1BeSyzJSPbtJGGdSlig0NY= 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)(376005)(366007)(1800799015);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: uQbNbPzMxDbfwT2nlpf/F6EtKEdMwZyWjahUUxbB32s2u8TS+xGP790oiaFNU0LJ/7lmhZ6/3w2sUGqU7jkO9XRQ0eMObucQzUw4Y+WsQ7fxxhpJs1vlSPaurzg4tl1yBDSE0V7uT7sKPYhEQ1fBFDKQUhmShkfz0ZnQZzapzaPzXtcmkc7NX+XjlGJFJ/ZHlwwPzgKfTge0lwnnlXoTEX+3thzyf+8r1E+tEpkOnJwr8RQrm8AD9J7OaGytMVfF6zZYWKfApdvVkIN38CjveaHWIGXP8QELT45v61sH1461RYg4yPqtFAecepxOuqulWLY53vGK1jPzscc3P7NH/ghTSx2mHi8XWE+bCazQhgGpwvlaScffQlkI/zVcIr+s+fWe7feBP8GmHiNjApnyde5eD8/sZyQwC4jOBk11hgn/1Ij4v6CYIg8c+fD/RA1qG18yR+B3nEhNmw+p9guz9A4p+TnVVUDeeFfM6a9b0r9VctCaVaBlTKmgh21QLih7yHaqEsMfFWMX3OjGvbxXdmA+AXsnJEPYTCi4q8TWutPO2RkVSw2D/jEQJ2zUcs/a7QWcZ067Y6KpLI2jKUSvZ9pANBbqsq9/0F07bbOqLP7G2ja/VmpEcJv00RsB0uZ27hgCLDdsm2oaAFr0iUSk3rPSD9wkVdNE+vq6uR2w7u/us2gK1j9vjrLmptYk9mAY+cdTO2yqLOQa3T2LsO4p1WwgSbLrWR1XU/LSpL18jQgz9OO2mj5SCXYlbtLX84qUm2nY8OmEVb7PcY0JVIwz+NL53Sro9U6nQ604txEn3VK9nhz1Is//gVr9yk+NtUZeHahenwzL+jqElZa7h6ACpFACaG2/7U95ZXrJvV+VRTHBYJds2VBfhM8QJLnbCwC4KRATZK9EpLQIG+IDlcywguzYJU490KxjGhAxca9Ev343Cj4Frqh+P8W/y70+INYJ1moUTFnmETE+EP8E9Z28Db5NsgIDxzb87GCeUasTYsu4NKCUnSThZBVwl3bwOFEVeu06sp8XaTrAWKNrYQyLAeb1G68U+Q2XOJ8wS9KDRof4UdwWcBUfh9wdw7VA0nglED2oBnYCA/RaZYoEqTbavjJjiyZP2BR5upulyqoXnbnNS8DFn+ak9QJVbHMF/yRM8nUxg71usV5SogUrS/8IeKmoEv07ziYAXCs7rN2/OnQPSx8aXGT5jN1WQOFLmrikdSFid2X8KF/yg8nz07GweaaCitiJ9NUuGTez+mPdF9TODpGe12TeVqILTq/8Md++1ZV/1fb6DtkTPZhNbL57M8tK7lIY8r9CpFjOjjjeU4UuOt/ctdF3tec4yFlyVjrfuzHF6iC8qnC2z3r0QqJVjwJNgVYsWpebDprf3vul75St9GazQ3K7v+6XNxKOvbDKRxA32sPO7r6TYXlqngUp5S1OC64N9wDpHNjOgtYKJ/guMxk1ILj4ocL2DMHKNsYRdHFRnsCRlWPlavn96X8py1rAt41szc1RoL5LUw5vUJRTB3bCDMqw+WMHzHKpVhkBgFRL1YhSBSKJyUKlvH6QfgJA3/oC4aR3sRB6LHRMCXzqxXFJry954+GnoluVnEK5caQpL8aZJY6Z7sPZ8pP0a/5Z+p1Aw4Oh9zkD9W3slevUXU5if8F0Q21PJk+xHO1t X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: G527QCCsoI00URFfb6AwZm71GQuHCTO+gCvcXJhC1ACv/ekaV5/Eq8vD5pX18W2PezQ+CSXLVfyDIQRpgq9T6S/v52egF3mL+mMX0Wu2zrN3tpZfSkXseZg+51+qzNMavivVAlNZnnVBFbr38q3uOeOHiCwsfGFoszAndwKCnOYLfjq6ja7naTYm5KNgVRl46wy3P6p6OlnlsuZSMt+KANzm3vClRe/aS6g6YBJcVXLEx4I3+YRcXrwrrmxhdXeF3F2cDjyTK7XS7ydFlAo0EkbHRFI8yxP+0RgdVbeZ6slRgodCRCyjFBkmAurPUNMbVu1emrKTN4hzDa4+LqS68tqZJsYdv4EeyfiVedYsYV0lpNxUAyfWmLHmYqMZJ9bIyi8vH0GIFz/oXN2fmd23czAJNs0YJDTNftcTfyHrpW1OMHjFZIAD6M37HTXCzke0c45Dn4TQmDC53MQTxcNxeFGg1NNKYXvA4GXJhcGCxs8E1g+5+lKIAFwN37MhRIKVcXuvIt1renPAFNyX4q1LR8ueo/6kt63bXDoRyc1WXGM8Oi3feyJdhhgwgzl3uPcswGKlKsB2uwt4ICnYjMd5DZORcZ53LfaqN993Ocgep/k= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: dbb7bf4f-10f8-4687-15cf-08dc4824bd1d 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:56:21.5154 (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: E/hRvVlaeUcm1pUg3F9yXhOLNt6DfMhmGj8akh2aaRwqIV/p8soVI6CiD5ToaUUyHjj+e10SD1zH+1d/8KQWpw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR10MB6120 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 bulkscore=0 mlxlogscore=999 malwarescore=0 adultscore=0 suspectscore=0 mlxscore=0 phishscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2403140000 definitions=main-2403190113 X-Proofpoint-ORIG-GUID: bvuavUVG86O04Z7zYGFOamVEQEgzfUte X-Proofpoint-GUID: bvuavUVG86O04Z7zYGFOamVEQEgzfUte Since err represents the function return value, rename it as ret, and rename the original ret, which serves as a helper return value, to ret2. Signed-off-by: Anand Jain --- fs/btrfs/disk-io.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 3df5477d48a8..d28de2cfb7b4 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -2918,21 +2918,21 @@ static int btrfs_cleanup_fs_roots(struct btrfs_fs_info *fs_info) u64 root_objectid = 0; struct btrfs_root *gang[8]; int i = 0; - int err = 0; - unsigned int ret = 0; + int ret = 0; + unsigned int ret2 = 0; while (1) { spin_lock(&fs_info->fs_roots_radix_lock); - ret = radix_tree_gang_lookup(&fs_info->fs_roots_radix, + ret2 = radix_tree_gang_lookup(&fs_info->fs_roots_radix, (void **)gang, root_objectid, ARRAY_SIZE(gang)); - if (!ret) { + if (!ret2) { spin_unlock(&fs_info->fs_roots_radix_lock); break; } - root_objectid = gang[ret - 1]->root_key.objectid + 1; + root_objectid = gang[ret2 - 1]->root_key.objectid + 1; - for (i = 0; i < ret; i++) { + for (i = 0; i < ret2; i++) { /* Avoid to grab roots in dead_roots. */ if (btrfs_root_refs(&gang[i]->root_item) == 0) { gang[i] = NULL; @@ -2943,12 +2943,12 @@ static int btrfs_cleanup_fs_roots(struct btrfs_fs_info *fs_info) } spin_unlock(&fs_info->fs_roots_radix_lock); - for (i = 0; i < ret; i++) { + for (i = 0; i < ret2; i++) { if (!gang[i]) continue; root_objectid = gang[i]->root_key.objectid; - err = btrfs_orphan_cleanup(gang[i]); - if (err) + ret = btrfs_orphan_cleanup(gang[i]); + if (ret) goto out; btrfs_put_root(gang[i]); } @@ -2956,11 +2956,11 @@ static int btrfs_cleanup_fs_roots(struct btrfs_fs_info *fs_info) } out: /* Release the uncleaned roots due to error. */ - for (; i < ret; i++) { + for (; i < ret2; i++) { if (gang[i]) btrfs_put_root(gang[i]); } - return err; + return ret; } /* From patchwork Tue Mar 19 14:55:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13596733 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 07DED651B6 for ; Tue, 19 Mar 2024 14:56:31 +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=1710860194; cv=fail; b=UUgLlCQnO9MWDFnSL1fVQT7oo6tOleudDeLut0HOax2YRayyQceXWkoacdC/z0v7za4p2Yjn6Sf8eIddxiMjvRIuN3YlRg5MKI9j+XOi5DpZmGskvIzf+KaRGyPO2w0bnoTdWiUzFCeolc6z70urRGXzoEvk7vFgVUHHRhAaqK0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860194; c=relaxed/simple; bh=DhKBWfgqO8lugkAnZdsyHwjPAUEeHWUUjyCKZOtPsQU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=FAxfPBliV751al5rTf53hekV9b7emRcha1NlcSalS8BNqt6DE0G8V2VwTATpO9CkNDfID1/3BSd25u7AIOPBt7TD5xhyahhXX/BxxNxQDRBa22CvtvOZfpqomKfPPN68cbPphq/5H9gaZ/XlSkrDdvJ1pVaL7w0B5G0SXM30eY4= 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=GFvGop0w; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=flm8cBkW; 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="GFvGop0w"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="flm8cBkW" 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 42JAHnrv005068 for ; Tue, 19 Mar 2024 14:56:31 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=DDI3EGzAelblbXDhfBqy3I+EUXom4dUddnsgjhlhSsM=; b=GFvGop0wqbGghEVVDms655JHmNopsN+ZNfXfYM6Z8H+ZMSVZI81z5orhEcpYM1VEGJ6W mAhMqdHE6RCml4X9Yy4Sd7uFzHBxg+laX71RJYncCvo6d9z/9GVwFT5v4UVSaUdA6R72 DpInOkHoQ15tn5+V6gOFfW9NS0KQ7Vyne+R1un/HEwaEJdTMaberZK1ghRVi73jK6vn7 nxDgm/OI8f55BXjCvFMs3Qjz34gE48iEJJa2N70ZTPEHC2qczRv+eTQUTAYTenW8iFJW laK8Kl0kCw3TH2dikk/3xcQ/vrB86/qX77GmP5eGjh0+lG1vBtanQ+IuDGk8NwgamGuu eQ== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ww3aadnd9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:56:30 +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 42JENGdO015782 for ; Tue, 19 Mar 2024 14:56:30 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2101.outbound.protection.outlook.com [104.47.55.101]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3ww1v6v5f6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:56:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FM1W+odqK85l7p/rdYE6N4LKOvVgq4+Mr7h3YuHSgrOJJluF+FtxltPOvINWkFbMcAXmiDOQiTIKvtO+L12SOphFQXNfUjL8UTEJ2j7F+VceWgAax+WXEvyaz2FNc1fvN/B8ICwdT/uJdLmFfmmZ7HElwSgamf7N+NVnRAFc5xa+2gcMZ4lK5UgzOt5NLhubGeKrtFnTAC7A1Tm6l085QKkiI6ZEhRy1SEhi2f6FyOAu/XReIGFQ99dIOgFMJkffnyuwa1wPY/he1ZX8PXDTSC4mAt88YgeYmAbu4FyOZ+/XWIDELj7lbL9hJC+3smsYNkoGR65bbR9V5z6pPGAcWw== 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=DDI3EGzAelblbXDhfBqy3I+EUXom4dUddnsgjhlhSsM=; b=Pp+Wt5CNPRZacBF/rrR4mAoF1dD3OwNUIlCBOzoP4bWNFmJEIk/GGk3WbJ/QK0qp2/FhjWBNq8vJie1plQ+i9b0mwg7u4QH2vNheSnbtrFs7de8S2h9AhcZ3YgcuWk0zXOuQGr+nCeln9Meo/pGFVzAnWdG2rLk1RZIGxLqOQtRjg15/GIFCGg9avsoq1TGK1Q5DeexT4e8UymLRDxhnSkMVxgy9SLphRJx9Mqv3w1eT59KNswQy8vU/dFhJtZpZ53ZwWRXwbRj2hN2Ewl1dhwTCJ3JpmPUCWzKtzQjswydI0T5I054WuaCztiyEIgJReg6V7yjX0DsGSQSsVSLeRw== 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=DDI3EGzAelblbXDhfBqy3I+EUXom4dUddnsgjhlhSsM=; b=flm8cBkWSpgEZ6bxnr/q8P7zLLrZ1E8X2mBm7nRgT+XjsMsTmWEX8/F1UsNj8lDyKXmzH5Fc3P3y5YhzOV3s80eSBAhcnRO9LcIZWO2cWS2AUDO47ePiLxBuZWpRhoQ2qnJtCa8uiIYfoWial0gbyxHcilHjjkqH5BvfShHtXPE= Received: from PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) by CH3PR10MB7460.namprd10.prod.outlook.com (2603:10b6:610:15e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.28; Tue, 19 Mar 2024 14:56:28 +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:56:28 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 02/29] btrfs: btrfs_initxattrs rename err to ret Date: Tue, 19 Mar 2024 20:25:10 +0530 Message-ID: X-Mailer: git-send-email 2.42.0 In-Reply-To: References: X-ClientProxiedBy: MA0PR01CA0062.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a01:ac::20) 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_|CH3PR10MB7460:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NLlRHoyMhZdXz3y4NCiBbXg3pR3GvtXGulE+8MBP5F3P2BI4rtwvczZgWoyoS2EuhVumfktHVQWPAWE2CqubuA+M+HDqpnA1Tsq0xWMRCku1TtlCoBOhhFLXVTCDd9/hBY1YJsMqQWIp/RvlKgxziNcIW8iNmWhywAmjuzoSX5UeqKTFEmqMMCVTNJZ3lhOlmaWfc9kST68oEvcUIXlcdD+QOYwA4t95esFGWlNJOxb2qBKoPp3kh9zJDMYU2U623J5NPlpNVvAWjdsvU8I86YGaRBm1JNk1EdpYZp2Uqa63q2K0CKzQRCVtVVivG1VDiGojnulqFVDSmvoRwgg26ino8YIu3utOdbNAmyApWCPvqyp781EnnVl/Vsf28H1kuVdrZfJ0JKMz2U2Ktj3FP50ZFfMykBVbCQYkcbldhHBrdk7U1VxiULF1iiL8eu6u2+kH6w/lga9zqVXwIMgsEM0pRVg14pYlwj9pV4gQyM104/IqkkXEOdds9Vbt2vRp3wQNJZrvowP6GdqOUdVHUFPb0QUSuq1+/kSJQs2eNg/dhEF9xfsmaOIkVZm1uZEIgJ+/E1ewkJocSu95QYyI3Sn8rZWQhY/Pr61MpG/4C0YaC8eR9TUsAY0l1HE8eMa/TO1RLLO7YRIuBYnyLUKfhbf7eVVkLDAndcbwnQ/+2P8= 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)(1800799015)(376005)(366007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: kwmZ8i5480YAgs/pb6iB5IYMA7pVdzOX0k8qrlOoZPwcTFVIDX0wk9q6EklJDGrR8m0cvCI4k9bRU9HVatsTfne3xvdmNNpiCZRT+k4hcLeeFhsStQFxz+AHBZNtjXzLQChc5AnNYdxbMQWor0xaYjDO/YY1m4XgRuLFJov8slaRoaPgPJO/pmNDoMBEMd4+ijWDuQ0B00po3sgWlfjategt/VWNdPNJ4H3JAQ9YdJO97wBswsqBrw+aRkk73/gWq73bS8q/1ntOyKA3YLqLoGyWEzh7P063lQFra3WTl6//cefM8c5pqQa02m6jnEXBPTX7jfm52HqTbaUZ+gZN7W+oNdJdOl7YeNB7FbWZyfqK2Xuhx5Bd6ZHNcxrvXUO9sYrKTIGo009elQOaSx+mcHtmw/01joZt0gsiERUdnhBtKOtIOIGvJ4qtKy1wK3Y4BSL99JiWIdOzv4j51bkGx6FygrSbzDWhECZvaHAknQBJqCWSjRS2icUbG8zGB+Dz8XsuhhwQN5ZjzBWOW2wMJAVBXF/2Y7uf15xqo8CuYs+YllxoKEa07LTQVQEgudjZt+Siw8PgrwYwQJ0Ec8LItNUH8HL835ALuU6A7/Y8JjF2ha66lSmq58XaCnD0etCDGHGquMOSGAVfBVZscg+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essageData-0: gbHvE1ALJ4q7p7HZJYrt4BM0u+3QZ1huUTzzvg12Z6NDcQbu0gQflbxga5kv845WY3TAt2XWh/2YKdqplrSqSwYQRiV/tU4YOUajsYOvDQ2ORGqMupX3yKlGpASYb7105RZ85jhcE/GS52tkgdymnEgE6n6iE10oAmGSNlk9F4RZRDSqpzj2/X/xPS3CzH8PSdD3qMqyRfFDFZH+Kf7gO9w1MLyC/DaKx4/NURScWGlcHAcwtY/WC3zHQURHogdD/NIwckfTawIs5gm1AfrV26ekgiuQCWw9Q2cIzdC/WSFXymyv2Nvhu7Po978RaqZZ+KUsrqWXgUJVrcCaxwhYuQjSZrU5s0CO8/J13oesbravTVgINiMB3UmwRT/1+ZRKhL0vBCn74BYD059jTI1oZYpWhvb8wQWz8VvSog6wbS1lHQpPjHfH/CvcTKQH0f3f/55TYElrNwMITrFhGeieWYc4s6LWNzMrGZW4uIDlfDhTfNNfF4k4qsrJz6vVZRSTNkwpS5pDtB5j35o0BP4cxyDA0aA9t0SWo3I6b+thKJCUL7OpbbKirrisuZ5eis2MN+/OkWPFXn68DtNkYidBmyqnXm5agj/xwZZegXnoAJU= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: b7326c03-81ec-4682-51f2-08dc4824c164 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:56:28.3379 (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: O6T/RyUiMeFIrquETvTeLHjmZ2YUV2heRgwoYu3Hu6JuN1aM1VTNrkL5vERoJm4z0hu+8JWsTEOjI4ptv08Rng== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR10MB7460 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: EV1bRwfenSHQN8S4m2r-hJ6PmEW_-E1X X-Proofpoint-GUID: EV1bRwfenSHQN8S4m2r-hJ6PmEW_-E1X Simple renaming err to ret. Signed-off-by: Anand Jain --- fs/btrfs/xattr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/xattr.c b/fs/btrfs/xattr.c index 6287763fdccc..15d0999e340e 100644 --- a/fs/btrfs/xattr.c +++ b/fs/btrfs/xattr.c @@ -504,7 +504,7 @@ static int btrfs_initxattrs(struct inode *inode, const struct xattr *xattr; unsigned int nofs_flag; char *name; - int err = 0; + int ret = 0; /* * We're holding a transaction handle, so use a NOFS memory allocation @@ -515,7 +515,7 @@ static int btrfs_initxattrs(struct inode *inode, name = kmalloc(XATTR_SECURITY_PREFIX_LEN + strlen(xattr->name) + 1, GFP_KERNEL); if (!name) { - err = -ENOMEM; + ret = -ENOMEM; break; } strcpy(name, XATTR_SECURITY_PREFIX); @@ -524,14 +524,14 @@ static int btrfs_initxattrs(struct inode *inode, if (strcmp(name, XATTR_NAME_CAPS) == 0) clear_bit(BTRFS_INODE_NO_CAP_XATTR, &BTRFS_I(inode)->runtime_flags); - err = btrfs_setxattr(trans, inode, name, xattr->value, + ret = btrfs_setxattr(trans, inode, name, xattr->value, xattr->value_len, 0); kfree(name); - if (err < 0) + if (ret < 0) break; } memalloc_nofs_restore(nofs_flag); - return err; + return ret; } int btrfs_xattr_security_init(struct btrfs_trans_handle *trans, From patchwork Tue Mar 19 14:55:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13596734 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.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 7B3E656776 for ; Tue, 19 Mar 2024 14:56:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860201; cv=fail; b=UdXc9xVvzBQZQx69T7oZJ0F4/tRsWvl8wWWOQQv8kXNlfXLL7NARRm88RN00mCWH/4AywZs8rEUkWoGlZ225x0MSnwTI+UezVoCkxlyDzPkqcswJLa3L5VIKEcUwra5mOLYesbbw6zckF3jEVC8FwVlqQ0bweEqI8g2hO2qt0p8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860201; c=relaxed/simple; bh=JCuObB9DUXou1EGRA0RLp3tIn16Bzo+3Vda6D/vKKjQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=FMlLJZajKEWfH3ZXgX7m9fawmWACx6lIlbgs8CKL4t7UvkzZXOBNireuoQSCKzmQO0XI/9P/a8ObWUdLRunQ0b+18AgcbKR61CFkpHy73+aaDYlz2Fqdeoc+8RyCiyo2XpfSEEhtjwcQlJanwsfvGHqwPV6TI0YHnP/nsXGDrIc= 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=ZJUeW5no; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=sW7809VD; arc=fail smtp.client-ip=205.220.177.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="ZJUeW5no"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="sW7809VD" Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 42JAHYab026414 for ; Tue, 19 Mar 2024 14:56:38 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=sfDlihruz91ILTqSsRBUow9swDcva91Cm4AuDDt9r7o=; b=ZJUeW5no4RfrX2v27SFvYIAfnD80y31fZjBmwA76qCFN7C20OMVz62Mbd/0GDisN3yqn sreFUqRFsBcbWERWJbLoHDf7zfgurggNPOY6bzkjzHmG8p3sVY2CJJWqms1wF6Co4cHS YJvpNtTZ68TNmKOUojeh//HDNknDGmpKXiQdokwZf3X09WmDC1M5r16Kxodc/RByB1lB OL+qsHqoNEv9mtRfz92Ma1eULSRPpY8kRgpF6ER2sRe2aFOvxSnBeMqO8F6aOhMGemUF Xa67fxllv6TnsK+62Akf779DQhB0eLFpokmNs0GZJgd36uvUbjeIbCUMntOUAm7H40u0 Jw== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ww272wts3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:56:38 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 42JE84xk003725 for ; Tue, 19 Mar 2024 14:56:37 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2041.outbound.protection.outlook.com [104.47.66.41]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ww1v6c753-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:56:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nhBywu0A/UES/tOe90o1zssnuB/wT/HZ7691rapmDDVqDNaBQzXs2EdsR+85JAooEp2nbrGCuytW5gxb7RR+pFOh2band2VomDUnQR2KxB469ywC2EpcWsRf+6AYhawWBJgVRLd7NkViPaVX0llvBsLnCEGPA8Une2TJbUKmTUMq+qKrS8L4sScxS/4/bDCEe/57LxgPKnoge2pah+vh8pUL0cTWg90AErZmGQ0/ILgvUgLSeAftLB4vWTsvEksXp63TXRBMnyL0wSppEQGt2MSN5t0ezpJOBLmmq2qXxkkyEWj750lXPdO0lKPIQXDhI07r0e1/Lnc5RCyBa2sqBA== 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=sfDlihruz91ILTqSsRBUow9swDcva91Cm4AuDDt9r7o=; b=h+gOHPAeDX7/6v3jByKel1A1Lwz5KO8NDcywm/v27lRi3a1MHOBgkrXjHZiI+sEpc09+yo5CzbdqTj+UJqZogk5RtbiNiRST3dj1+TJxs9DWP8xO0hK76Nf7KKlRJFndTNyNZHXcZc7wmTe9CXQoIVFFtZKXAm8QwnhjhlEZWI8aT+FEoQd5sug8WcERAQLmIuhDUdzWx2Eq8UYPvd5DaGSlufQ37/6410SJJwcODU/ct2+8w1qCEwdYFgy3Wa3HW9cpUw0dIb3SJvCu6Svj4iYKjXKeqlAqB1s3RQWVKF7RAMDOcvI2s6scH+O0EIVPtZpagJ0HM22CWbl0gY0C7A== 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=sfDlihruz91ILTqSsRBUow9swDcva91Cm4AuDDt9r7o=; b=sW7809VDDTbw/IwP7HNRW0vQV4/SsshFDba2p3i/+gjx25F2sKtXLP/JOgx0PGfwh9377jyum2K+0TJ1AUknJ1kKy/j14Ip7k2RjMnzJZ4dgB4MXUoai7UnKOIkySVl6OaDJUcXMnGt6WrGeWnTqvtcg2v6T1C73lyiWf+pny2g= Received: from PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) by CY5PR10MB6120.namprd10.prod.outlook.com (2603:10b6:930:34::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.27; Tue, 19 Mar 2024 14:56:35 +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:56:35 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 03/29] btrfs: send_extent_data rename err to ret Date: Tue, 19 Mar 2024 20:25:11 +0530 Message-ID: <03e43b7538d2a8e8213d491d65bcc02aa9fa437d.1710857863.git.anand.jain@oracle.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: References: X-ClientProxiedBy: MA0PR01CA0113.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a01:11d::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_|CY5PR10MB6120:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: giZ3cuiWngmBvzBy2NeYTiTzMors5MFww89Pv3abQIjeqp/t7dINoW+Zo/fJF1K0Z10J2UdOQpQHTQDCnaOnsedixtAlUYFf5JVZCzp6kZPKWrBzdYhA/kxxB1zXhuzE4mzdFtroa4kc7jagSEAPXygvJE9BRGMXUl9C3+rXhoxNwz8Jj1OhUqH7YAWd8gh8PMmjID5fHAbJyJZ88/bNqDTs4Qvx9ib2Hv7eDTIqY73hKtM/BczKCIEecDd1Kyl01cy2g12hR6gZZYU2MfRJNHjmE2FEoEUZ+UMASMzIZIbQw77muqZm1yJDr74Gekcqvq1P+NcZi/ccAPlB/hYr1Ip/suEDdyb2FZCFGCaTI12Ss9QXbb7TqJvUwJosFJvGnOTC6fBJUPCL3BbWhS7a9pr+lZ8Q5fMUCukLdtTxCFuV7uFWmjy1V17CLYO9IXAIKMyxFwWh55YM2Qj1YisshNV9sSxlIv0qzz82dCsTPxwFgu6yyWNmzC29wZ2gke+RK+94HtcVPTUbuyRpg9+avtuaWoNWjtWYvXnYVXj2Mg8h5LbrEsi9R3nnHJ+cBEBwgBe1em6bpvi3Lhir0AUgg7ZvBrFiz3CYTTkKsISbgWRUajvkldqkIdBIKo0wqws07UCwugOu+u9F2XERBw6DJFdpKfXdFZg4s7UAlwUnRqU= 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)(376005)(366007)(1800799015);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Wnog3A0zlWHptcIXp4fyPUVgip95xNw7KxnTr6mnf9J5zW2cPOFYcXyyx6if84AoPG1pc4xed/iiVuvsgmGctZIoHM1SqQfxr7Jy4G0qCKXFz7NqOfprVmRA+54DuIrFPEg8O9ZkzRSVRIcLDfsOuwPrqK1C+xexm3uI5+MPeljoUHuJvNVlqAl63aiLUC6oMdkzTor8fhT+2rdDaeaAysAyy4H3xi9DxtjrxtDvVb/NJArjqWSucmo3CNyGqxiJk5SNb8RUQst0/djbnTcY8a6x0puZCtppQQ/VzB9/CzqBDU7UI062822keg33kIRFk/orn32hyYLtHCl0MkHhJFmXg5Nr+meK/ba2QqR4aj382AtwvPriGQcCvA+vRhRcBZ85ZpHOZaMEEt21P3jOJaT5a2JyYPc/aDCjBvBAn4HMjc8fKoKxlMUYbt3eDULfi92Ozk0qcapNvUd76XiqWhbMid41pxvW/7BtNJ9lKGOzwZYu5zKuSHeM8k8ekmu2pluwUrdULVUZtShO9rAL9vWA3mAWVh4khzWKFCGkXmfSHsb/ZqbCKktvsdyRViu49tuFrEZtbiNo2c8WnUVQducE9MNyy255Kb0Ox9TklkicVaqJNO48f4TrZlNAVNlZ4lhyWqMuA62XueBPLJ6fiodebkTZmG5vjaX+faApE6iaVqPW7/koZ8WOCUsZxPULk8L1Fa5CD+01mo2xDy/Vzd8xzChRqkc6bzAB6ftyjfut1JeBZeDBPd1XI7qERM7cbSuYgB5WQC/pyqQYG7YZOsu3wtUegHU8mkYxRAU7PtFkaRNS85KrHSy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76TCW4aMgtgggSPJ138/E6cbtanOnTi+uaoy6gdf264t8RTyqjq9q1rT5idmu68X7Kodg33lB8ywIQuVnn/MT7jevAOCoxR2oKv9yMDTipvdPadJ6c0vOMd2vfbKW5Ug/UcpktAsjHnwBYhvlWjvlD+2FPeVBnO7Tp90vt6YtgEIq/Vsxi90vFEh0eGcSjl6kVbhGFbvbdl6WGcniGzFEvs0J+KYEH4vH7EziZnsy68+jD9Lg2YSUyawFTXXcC0iKQND56IUUmKsTW/EA82Gqs1BQTksCU1yEyusQqMm4fM7rKbYxPEM4bNN0xYfSaniMOZgK23RwqwT1SrmZ+g8hb+9oIY7CSByZBfU4s+RuLfHdWJIPS5lxrDpaGnReIhbaMQy509iziQt2hPjonUIYmmDIJ8nE0B9QkrV8O9glzENyXUHfDdiVHKcRcd8c6yScek= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 26c3bcee-f966-4334-3158-08dc4824c58d 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:56:35.1139 (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: O6jF4274gLWHuljcEjxKCONkvpMU656uV50cZkWX1xUulQsywWhllM78Hcv517RHv/PPeDWIhV8aN9X4DXo/Ng== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR10MB6120 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 mlxscore=0 adultscore=0 spamscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2403140000 definitions=main-2403190113 X-Proofpoint-GUID: fNe0alA0XqDv_eZwcq0xYLwzXNFg7v10 X-Proofpoint-ORIG-GUID: fNe0alA0XqDv_eZwcq0xYLwzXNFg7v10 Simple renaming of the local variable err to ret. Signed-off-by: Anand Jain --- fs/btrfs/send.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index 50b4a76ac88e..7b67c884b8e1 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -5748,10 +5748,10 @@ static int send_extent_data(struct send_ctx *sctx, struct btrfs_path *path, sctx->cur_inode = btrfs_iget(root->fs_info->sb, sctx->cur_ino, root); if (IS_ERR(sctx->cur_inode)) { - int err = PTR_ERR(sctx->cur_inode); + int ret = PTR_ERR(sctx->cur_inode); sctx->cur_inode = NULL; - return err; + return ret; } memset(&sctx->ra, 0, sizeof(struct file_ra_state)); file_ra_state_init(&sctx->ra, sctx->cur_inode->i_mapping); From patchwork Tue Mar 19 14:55:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13596735 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 1FD0B65198 for ; Tue, 19 Mar 2024 14:56:43 +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=1710860205; cv=fail; b=UB1c/wh8WcPRVotKHQ/iZMoszTmGnmJ/LBf/N48rwjZa+FqiWxemjCisNxEE4iGgXgpqEqXBO0yu8+9H6IhzuD52vTQehjEBxIO0AG5GtmfltNI02liIvNF5UN5zDX5qAqdgSuVwikKbJMcboElk4Y2mGlVxpsu69FWpBJNXxmE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860205; c=relaxed/simple; bh=02/cvQOxLIEbOzQAiSxxQ5bgWNAQotx0/X+TbvK6Yxk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=Gm6T7ok/Vx0fB5FLJdxdvEXRVsOlkUF6keXttH35kbWKguL+cmNFv73VWTDb0sj8vXTdLDz2rrCx3CNo0xLRaNxpDONHrXhnob2U9Ac4+y0gHYUUbLwHoKBXfklJwVyaE5ArjdsCnEAE+6Ykm8fQueqB48coxoeVMQA4IoJoZZQ= 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=j7K5jLps; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=PwDhULwc; 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="j7K5jLps"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="PwDhULwc" Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 42JAHtAn010428 for ; Tue, 19 Mar 2024 14:56:43 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=waY6mW6CUoKjBqtTyftWKWSLGKrLXCjeXP+o4aGYQsc=; b=j7K5jLpsv3UUFRYAK1Pkgm2TYEDGbp0cuHOl/q/mHbpXrUfamyE7JwrsAQLYtAR8G3j7 ODzX7rE+j4BULoPOnsL6Qxwy0WlDWXcNGLtIg3jL6Svl3YRhkklQ5Y+72ytCwpc2+oHY DPCp2Y74XYu9pO7muoNC0ywedhG7aOqrgVxWxI28AcM94Xcat6RH4OrJ0WxbSg2uaX6/ MXFQVaQo17nQEpUC7/ZZCCG0Si1D4WDtqQUp1ANtDWL9NgkM8Ex8hg9rgqqTKc8dfiSZ 63RFxQ++kCFWvYlT89wO6evsEoq3dNTy5QLql9ladpREf6s2R+TLDIHCmec+sek61ImL MA== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ww3yu5ku9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:56:42 +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 42JEqVjd015777 for ; Tue, 19 Mar 2024 14:56:42 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2041.outbound.protection.outlook.com [104.47.66.41]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3ww1v6v5qw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:56:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LLJVb98rD0wCRfpMVkV+0wrUVrT953N2ZOETwjZiFy/kaTYbO58l7+HZ1SehKyyze+TfSWxzlD/nTuF4i38kCgCxdulqXG73twctAAZa5GyVv+DrUqrMiUPBNH7WrUngdL7w6q1fSLp3FeYef03WwwlIpJDOH4q4PEvHLgCL6A4D3Ox+x6smbMQA8bBoJ2bdLJWnGqLfn8BdY+yPrXx/PcHkB6CxQtGeK/rMlMw25ARER7fOMsi6L1BUrIDF0dSUZlhQsLV1nr3sRTXp1sfBlkSlhqAOHMc94h825scvNwpMmSxOqoxJuYhjHxUZrSRFWghIAxzQ9/nW0y0UIrbWQw== 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=waY6mW6CUoKjBqtTyftWKWSLGKrLXCjeXP+o4aGYQsc=; b=KwiggiFWvPGDz7IkTUfRkv7IISR0spNLJq+vQ6qlXvBnuk25qs8kV9cVoHpMbRKJNF6U45G8Be2EhJ30Wtov0GsQ+1cHkL8sDKypTJecmrDLTrHeVPlQEgk5XDx/29ER1apCvUIJmyYa6GCBlxu27uFryJho+FiPO2emxX0SYa9d7ViC+IsC3U49qgZUDgEJnDh5+bp5w2I506FSwyUniOqURk7/w3IM4pnPesPJ0MfDURarW/OdvPR82vWC/tW+opviAmFfU9ZwPTDzFXkqDRoFVRle792IFCVJnZ5c80CfrGXFiv2I9sCvV2+XinNJP6o9hjKeS2vfxGeWSGC34Q== 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=waY6mW6CUoKjBqtTyftWKWSLGKrLXCjeXP+o4aGYQsc=; b=PwDhULwc73hZS9vXW9UlINZKwLvul894xVRdCfDJKw6AsXmcFzjx8wVmU7W5gnW6P4LtRtL/MKv75ZpvXRX9cynPhJwSIdCHTOjTFRsY18iR2HK34qY5tTFnyioJOYUkidKhTERkCzc7/Xp8ZaaK0Eom3M7hgZxMZuQdXXgYQYE= Received: from PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) by CY5PR10MB6120.namprd10.prod.outlook.com (2603:10b6:930:34::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.27; Tue, 19 Mar 2024 14:56: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:56:40 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 04/29] btrfs: btrfs_rmdir rename err to ret Date: Tue, 19 Mar 2024 20:25:12 +0530 Message-ID: <2302e3c42bad9daf062ab26ba020a386b303900a.1710857863.git.anand.jain@oracle.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: References: X-ClientProxiedBy: MA0PR01CA0111.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a01:11d::17) 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_|CY5PR10MB6120:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CIFwQ3MEQwIbASNm+tW7hzQQ3vS07fcHSBAueWdFbqo+1CmWROXwgJMyWWSlw6NtEFsTxRLvuXwVh4rFSxKjhEgKqaW2MZVV4eLoEXincIbP18Ss3JaZrZA20T+iL7wEtQvZBsLE8XsW+VTVvnjfjrLoLsefLG41G5ulddomqRdPtc9T9v0nB6MsgaWFkNxy4ZDRd2lmEdqwXGhzVWJy+oVjkTr0LB5wDWCe/8upNVSA/Xdo0vzBHMqulF+PrI/Rt0ij4XHfS+uDq9mPOJXJLMmQGZjuFyyoJE567Xz/b7Qfd/WsDHnYqTY0slCPKY1GH9glbxEPciWltwLGaeNTYBkf/EcsFtE3cAcU1pMWQRCC7uo9zDcUR9rSkhLVkw9p8+lUZHiaPJcXc8KZThDLSr7v5LSgYqRAhMHK4ruaXyxVcXZG7jESozMYrQgbLvIg33Bj0z07RHzWNF5XR3ep6ID7KU9jrciW/NKqT7j4Ss0Gqn8zSl99iVsnWfBObJ7SKtuUkZuwN6z+YyqzqD6qPJ4WbSJFvQGJcS/eA8bjt1bRbUedB47DI4pW0ACY9COkoJM50NiSST3kjElYCvvAE30gWmSahNHcb4OOxeXLRA1qSfuypoJFKmxynyqjRODVceV7JkzmX0vKJVg5OrZ7G3dMc+9YZM5Wii0dGonpnmE= 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)(376005)(366007)(1800799015);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: eUs+edtcYS65nTXTVSZ9OZt6VetwPqORsKp5latfXjvEdiZQhFKDbBBatU6sqr+O0ezPfwSVvHbmHLH5trlNZdWYJvv5FuPORc9TiAXtiyf4yFU1vWOuWCiivIqa83yLc8vCN1YbI7dLNgQTCyCEEQ6UId2+6P1UtClYXipd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3yTN2FZc4GzUox4bhLBRT+dhgto7jOuj1KNk0lJVE1GmONCFZUs+umZ1xztOJY72jxyJB2/WShbKJoyNy7yp8NDFkEu2l4nKAEjQeHy7b/X46plRqklrAO2jORJ1RLyxPdKsqLBkS4rJAf2JeVszz2fsDQoR+U6XBaSweYOfWE35zJRqURItDFzsli6FohevRzwAW/INC/M5B6+bJALk+1ANMT0MMKUm+jZEkyTzc3eiYP6Yg23goc4oeff7VwvVVw5scjstNrhyIBRrQAY2e2WOIO/HXZqFjwul6T0lNLCpgVlM5RhEu/G5buguZHmkSqjmllxxpenCAGKbG18z5yD7l0maSnp62SDLolO2iM5NKgOcBlQrZ842woX9G7usRXBRH/ZUGQ9SwGq5po+XMoLmey/UXOS X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: UDCbuW6WyzVjERdOVVUTf5hFMWeMviy3KU2CtVIsWHdDDU8I1+77FiIhq+DgDM+4zkwDmrQyKaCLwTjYJOjSGCm6GT1kUVDMBayjiizDdYgdc72akZRC7bWToHvJ57fefH3ydCSvfjTHG8rYeD5a9xvn56e+raXuUTwRtpEjcmMAmxjx9Gk+sHBE0C7XhKA7xWMhDya6m3Nbi4IzsbAvISnpKFktxJJvftm1ktJeZ3wVBedqqjEYaHH6WM+mC1TuuoGmMjkvyL7rmelwm/z3130isu+ghX5tnnAXJzsCj3914/rar54WsDtXYp02slqSeIO97744O91gx53bHtBZ8PD+l1GXe5lp7DcIpAkna5z/3WRqg9IcANItg2R8F9ZCWlsB1/eQ6BtI5cVKrYLSeu/bHj4YQhlgE++XJ/0zVyn6HV7TH/RNn+XIkbpqi+SfE6hjTw+/64mWTaLAU9x35cjlnMZCyILprgEKY+1EI4JtMMCeNwYbQEuxKjvyMXyMqEWHDdDYucNxKuRJrxdgQT409+6nmiSaYvJv3Tkb5OraLafqoK9/3XL86XkzwPdN0NBs/5ca+vOqdA8204YDyNxtZDokwd6YohbNItlsI8c= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9e579580-62a6-42c9-c295-08dc4824c849 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:56:39.9424 (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: PbWVriYpev9h9ztstGBX0eEFK4dW0lAatxfvS0vVDXqeWME5KVp0Io3PYwC+ePukDUdKBnA3NQdXy8+OjJD0uw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR10MB6120 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-GUID: L9AD8HfX7Gyt2d_Na7j267WheaUgj-p1 X-Proofpoint-ORIG-GUID: L9AD8HfX7Gyt2d_Na7j267WheaUgj-p1 Simple renaming of the local variable err to ret. Signed-off-by: Anand Jain --- fs/btrfs/inode.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 37701531eeb1..a2ad3bc8900b 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -4635,7 +4635,7 @@ static int btrfs_rmdir(struct inode *dir, struct dentry *dentry) { struct inode *inode = d_inode(dentry); struct btrfs_fs_info *fs_info = BTRFS_I(inode)->root->fs_info; - int err = 0; + int ret = 0; struct btrfs_trans_handle *trans; u64 last_unlink_trans; struct fscrypt_name fname; @@ -4651,33 +4651,33 @@ static int btrfs_rmdir(struct inode *dir, struct dentry *dentry) return btrfs_delete_subvolume(BTRFS_I(dir), dentry); } - err = fscrypt_setup_filename(dir, &dentry->d_name, 1, &fname); - if (err) - return err; + ret = fscrypt_setup_filename(dir, &dentry->d_name, 1, &fname); + if (ret) + return ret; /* This needs to handle no-key deletions later on */ trans = __unlink_start_trans(BTRFS_I(dir)); if (IS_ERR(trans)) { - err = PTR_ERR(trans); + ret = PTR_ERR(trans); goto out_notrans; } if (unlikely(btrfs_ino(BTRFS_I(inode)) == BTRFS_EMPTY_SUBVOL_DIR_OBJECTID)) { - err = btrfs_unlink_subvol(trans, BTRFS_I(dir), dentry); + ret = btrfs_unlink_subvol(trans, BTRFS_I(dir), dentry); goto out; } - err = btrfs_orphan_add(trans, BTRFS_I(inode)); - if (err) + ret = btrfs_orphan_add(trans, BTRFS_I(inode)); + if (ret) goto out; last_unlink_trans = BTRFS_I(inode)->last_unlink_trans; /* now the directory is empty */ - err = btrfs_unlink_inode(trans, BTRFS_I(dir), BTRFS_I(d_inode(dentry)), + ret = btrfs_unlink_inode(trans, BTRFS_I(dir), BTRFS_I(d_inode(dentry)), &fname.disk_name); - if (!err) { + if (!ret) { btrfs_i_size_write(BTRFS_I(inode), 0); /* * Propagate the last_unlink_trans value of the deleted dir to @@ -4699,7 +4699,7 @@ static int btrfs_rmdir(struct inode *dir, struct dentry *dentry) btrfs_btree_balance_dirty(fs_info); fscrypt_free_filename(&fname); - return err; + return ret; } /* From patchwork Tue Mar 19 14:55:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13596736 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 EEFB864CF9 for ; Tue, 19 Mar 2024 14:56:50 +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=1710860212; cv=fail; b=OKvvt11EGK87FGne+RRUpa6wPgw3D7AUdBVCSRK02xphh4LLxrMEDGoGvJ9xIyW1VFxEDJ3PGmsdvkyaZwR0i9ADxchTf9+Vn0TU8jRJepajgBetSfvH9PXzikqPUKGJ1icsEXzRrpgelkGDwuDqya8d6hh+Vn/h9MtmS2lYkw4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860212; c=relaxed/simple; bh=EgMfFg/XCcUk/OncDVDdVjbUHu15K1iVzjjkzSfJELY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=VZFEnRP3U1n2rn8LMMzRcWBGgTTY4RMn4Ja8xtiq3qN/fQjz2b5csvecWjNx36guXpmZX+e2yM6jvP5zcfgV3tWPvuSCb7stE7SbQvSE+N2+HQXErCqIzxRyojUFgdLb7lgaBmEyD5I2cw6mSdpMLNGSOaBm6AAyy7BgOin8brY= 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=hc1iIpWQ; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=fJrztIat; 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="hc1iIpWQ"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="fJrztIat" Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 42JAHYFf010465 for ; Tue, 19 Mar 2024 14:56:50 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=zC1lZdvdRBAWSFYqoLnXlLeo9XINI7btoG+7uECMiGU=; b=hc1iIpWQgIr+eLhpEM0aoRneKFDl1sRTD+KCfUemNC0vNhHbicI2SZvDlytE97T9OvdX mpjskL6diMlbIjouDrtpNR/U5qZz6nn/gngrBBC2molPVw+VCnNk6VRAc/ejgP30SdSY uENnY6ILUj8HnQPBE8YnoVsNbZBgdunN0/VZZE4wFRXrm+7h+NrEWjhVKUq6XUC9tTTL ANvrz1pcCcLiCkexIX7tRbwgo61A/LZI0RiyZ7MdKfnqBdgQIP4bvV9+bmh4xOkPKMK3 lErTyXwg1pBokqfU5xOXYvXG8BPEJHoTzJWCe0/HycOCI5vr3G49PJof2QUwUQMQcx1d Gw== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ww2115rac-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:56:50 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 42JDbQXs003718 for ; Tue, 19 Mar 2024 14:56:48 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2041.outbound.protection.outlook.com [104.47.66.41]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ww1v6c7cv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:56:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U5gAt1XRHhWMi0h+4HQa+l3O3VtAK3fG5L1qkkWbBc8KBLZOyYTDMNAivKpbNVyxKO8YE6y+3zgFxm8Jbca+euuf4ltY/nue7VDl/kQLXWqjoIxsXZD9u4yoOzBOUT+CtyozoIB4SZxTaYFP1327iyes8KIeS/zuRFxaS233eB4qD15gD1DGQCAmxLlMtPJ7Os1xXaPhLl7nZjquDXrHNXHlLQnwKDwvNcjrPzmL6oeapUAIqlkh56WSFxCmeJ1m54FRzRPXIuFiCknTmFDqlDH9y0Lk7xAiOLc8IxSjnCZbS6Xy+517CrV7lUyTFybrWEV09YCUAdijEH+SYM9U/Q== 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=zC1lZdvdRBAWSFYqoLnXlLeo9XINI7btoG+7uECMiGU=; b=JbNbPPvQJgF/PVrDqYpfqF6qvrDOG7Ha1AfdVnoaJE1HPjfWjjpZ/+H61Y3k2EugvdxDD71k+Jj3mxpFplS00MdHabJbuPywamoExj/zyIUdeD2/EaXErhFus6uBBzc7qG3qM2WIacUIZnXOVRJb4YbVCnfjdiVNZZBRh//JoplUvWGAvzoZued88+naVzj9iokQvQno4BMGrgYTtWMbGG4dLn2vOxU1NWIVBEFFa6a1m4VM4kf4agBRuHMrBTNc/9z6WpgmSjg7PZUXSy3IJmlk0trAiFnhYovfF/jG1J5ylxx9FPX08RgcNWsEUYuU+B4dsrVN1f3W+qE0ctqN1g== 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=zC1lZdvdRBAWSFYqoLnXlLeo9XINI7btoG+7uECMiGU=; b=fJrztIate7n7L8+wISTs9OuyRQLG2xayCMosNX0qz1ZtO1iPiNRJQVN5CwCT8JF0e7mVwM86BvSEjojsW+LlO4LvvHyumjAl7G0Q3XzhY93Pj62K/CzECZlJeDgQqMzYxVG8pnTQtFHkXShbtY4b97KoiTzTO8puZT+EskAaE4U= Received: from PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) by CY5PR10MB6120.namprd10.prod.outlook.com (2603:10b6:930:34::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.27; Tue, 19 Mar 2024 14:56:46 +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:56:46 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 05/29] btrfs: btrfs_cont_expand rename err to ret Date: Tue, 19 Mar 2024 20:25:13 +0530 Message-ID: <2d1abd207777598c5e681845dd234ba53190d157.1710857863.git.anand.jain@oracle.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: References: X-ClientProxiedBy: MA0PR01CA0112.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a01:11d::15) 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_|CY5PR10MB6120:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FQf7A/SyhQjgaA3fv++dBuFnuEME71aJnd9xztmP5RLYEosdQ04ld7KJshGyP+eylkI7TAqNzmEp3YmTHNEABiai18MkRGUx9c/WtUEpRRgozP6WiVW4QFaZe8i9uymkj+fwBVmEugSyqsXGvdnvhg4tuYRMvQeU2kFwSGPYPFNUcVSKcDNN192EhUn0ZZSRpczEAfCoFn8XAbxSY9Bx19PrWUSfjzpoGzIj8CjZt5rt84Ihd4VjEKFuxRryybuNaLb9agtOUuOpp36zMa7klRDZLSaU45p5b9Pf8PEompUm/aOlBiqglx1wbTAg/Ewqoy2d2qJQJsUQHQlK/5Pe2gx1N0BSQ5QT9IMtLCCx4YJ1gY3qCO9eOd3Qw0dk36EAsa12saTO48FW4wAZCP+5s6uoXuBXPb3enl9uKa2ivsp1RXmvLWte7EVNSsIo1nUFXblPksEuv7J4Ow0fUiQx0GjYfoOpw9G+AVHKsNISMbAKD2UWeVQ8Ug90ljNahYZcvqqg6Oii/Fty7kRhkaiteoIS1diBt0JvUbRmadSmOBc+Y1jLXQcLJMuGDeIyTFqI4jIOxtk9AJKgia2Io11K81xQmfY6yBxARAQnPUqJsMgJU1RkKX7y+bs5xAoaXzcWXjG5NY8E4TZT1C/RQp5BfxxOZdE3nUKARdUmO124TcY= 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;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pplDbcQ6je5tYBiHWWb6w+bOgN1Z9T4lOerxNdixilRYAyr750OWku4ZYI+/1s5r6EhIVxOilEmvZBLHLBDbe8375HDgAGIjNbsfPbeWGfJ0kEqLx/yRY055cessHkpRTyk4gu8jWGj7V4UuZTfOr6jtJMsMJmAfOj9ExJAS5s3XxErngyXIxkgncGVmWO50nRgPZuHnXgc6XIP68L+MspTIdSY5s/kXwi4OqLxsccWSaCIuOWcSTI0q6vi5Ezmp7qGqeUmv7OZMOy6ZVDtF/08iTsuH7aX24EXIk1YpHTlFRc1sUHJWwW+owiSdSb9215BuSmSjxBttj2So/VD5BOfgxW/trSD9rT7XUdqpGpoqTtlCDg5Qe9Otc86VE12fXaGPYI9UBUuKKn17Rc5r2n5hi6JT7HmMOrHKhSnlaPe7CZcXc87TMQdfvHmB0ZjT3E/qqY+oO20y7W31eH1LxLi+RuLsBviHSObKcDVG/2cSDMGO7phGGceuqsDizxLSUOflTFlKL+go87vjyHGzII4eiL/Lv7IqMfDXr+PwvhFmoaEGav3tr29qj9j6kG83+K1yZHa0wznkc56Fl6QRBwahdhoxrHzVS1EMCZT8qB03PKAdeaXCu4/dExPbWa1T+Raxe+S2FrY0AKmuI07DEM6Wxcsco9C6vRLu6rk7HdrYp/gfgd0g9u4cegPA2D X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: xfjZupuP49XOpGnjPIYWMftDFxD7EYPpx+itOwbCqqEC12IbLzBymNkOjpk2vK5Nnt1KMmLT7+b3KXhIFIGIGnefoxkqVTz9veyiTTOGeARcdCqvtm/IdTwYtPRumTftL12qxx05KTGcffbtDwRWHYk+dX5G7MEK6mGh5k82ESQ7i3D8hvlhyuLg7rGy0PVWPkHpIie6ofhbcnkxQ3OIi9ibdTf9hdmtnVLCraE3dCwthkmj//PWtrUPNoCXlIsI4+bqjUHShOlYkG347aQxCHLFcko5SPRfwJ0V80xmEmJUKsI5f8mdshuz0zhbAsFu1Nnh5GtiJ5wIDU6WTX5nIxecj4oohVvdu3lIz9iglKSBRULiDWiRdwjRydZiJ9vQtaZekx4tpbVubsAANsyEiJ3OxEg8nsVcA4oNPAbbyE/p+acsqCJLE/i7InmiLTVwXccE03OawNK8P9voppYXEkqKVmy0/lzOGLxsjw/ZmVgfFnKpAjumCC/qtq2imYyf9f6RFJHi/VSK4j2h3PyiQXMGagZzyzWFoi4KG99zhzdxEDVtb77YIxWShwp4tIoxEoMH9AwaUAUE6UaR9TAlLM0D4csDT+EHsgKGcEbv+4Y= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: f725e620-a9e2-43c3-9650-08dc4824cbf6 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:56:46.1174 (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: CeVKOD3w8ISqpcSY2bVsh1ZpXvemW/QhDee373kZlCk9BBFi11JM/Zbzu3BEylWkYzMRKG0X5lSJ2ZnuyaaEig== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR10MB6120 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 mlxscore=0 adultscore=0 spamscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2403140000 definitions=main-2403190113 X-Proofpoint-GUID: oXmGJ-i1jWhT8HrkEWJUVZQlK1G0GF0h X-Proofpoint-ORIG-GUID: oXmGJ-i1jWhT8HrkEWJUVZQlK1G0GF0h Simple renaming of the local variable err to ret. Signed-off-by: Anand Jain --- fs/btrfs/inode.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index a2ad3bc8900b..27183225ac54 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -4923,16 +4923,16 @@ int btrfs_cont_expand(struct btrfs_inode *inode, loff_t oldsize, loff_t size) u64 last_byte; u64 cur_offset; u64 hole_size; - int err = 0; + int ret = 0; /* * If our size started in the middle of a block we need to zero out the * rest of the block before we expand the i_size, otherwise we could * expose stale data. */ - err = btrfs_truncate_block(inode, oldsize, 0, 0); - if (err) - return err; + ret = btrfs_truncate_block(inode, oldsize, 0, 0); + if (ret) + return ret; if (size <= hole_start) return 0; @@ -4943,7 +4943,7 @@ int btrfs_cont_expand(struct btrfs_inode *inode, loff_t oldsize, loff_t size) while (1) { em = btrfs_get_extent(inode, NULL, cur_offset, block_end - cur_offset); if (IS_ERR(em)) { - err = PTR_ERR(em); + ret = PTR_ERR(em); em = NULL; break; } @@ -4954,13 +4954,13 @@ int btrfs_cont_expand(struct btrfs_inode *inode, loff_t oldsize, loff_t size) if (!(em->flags & EXTENT_FLAG_PREALLOC)) { struct extent_map *hole_em; - err = maybe_insert_hole(inode, cur_offset, hole_size); - if (err) + ret = maybe_insert_hole(inode, cur_offset, hole_size); + if (ret) break; - err = btrfs_inode_set_file_extent_range(inode, + ret = btrfs_inode_set_file_extent_range(inode, cur_offset, hole_size); - if (err) + if (ret) break; hole_em = alloc_extent_map(); @@ -4981,12 +4981,12 @@ int btrfs_cont_expand(struct btrfs_inode *inode, loff_t oldsize, loff_t size) hole_em->ram_bytes = hole_size; hole_em->generation = btrfs_get_fs_generation(fs_info); - err = btrfs_replace_extent_map_range(inode, hole_em, true); + ret = btrfs_replace_extent_map_range(inode, hole_em, true); free_extent_map(hole_em); } else { - err = btrfs_inode_set_file_extent_range(inode, + ret = btrfs_inode_set_file_extent_range(inode, cur_offset, hole_size); - if (err) + if (ret) break; } next: @@ -4998,7 +4998,7 @@ int btrfs_cont_expand(struct btrfs_inode *inode, loff_t oldsize, loff_t size) } free_extent_map(em); unlock_extent(io_tree, hole_start, block_end - 1, &cached_state); - return err; + return ret; } static int btrfs_setsize(struct inode *inode, struct iattr *attr) From patchwork Tue Mar 19 14:55:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13596737 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 977D264CF9 for ; Tue, 19 Mar 2024 14:56:56 +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=1710860218; cv=fail; b=XH718T3mgzm+vsW5OUDF+9L+wS8g5mriX9uiVrwwQn4rDWwm+LVFCNpwSbVetjxZnqaurakYoAgn8tI+1C3XgIBRhfaNJFC2Ney5Qh5qeCFen8YBFKIW7wsWdAAipRnIpIONfgkWQdatxGoBSSoROjBFbJuSd0JihhzT9v8x5iA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860218; c=relaxed/simple; bh=EbFDQdRgGPDDc28Su9rLXle82vMzjZ0PpclqLe3E34g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=bFL8FofL6KnLR5ZjTWzZ7egojvcoQszGWM+wVrIfvlrrtt+A+C1rb/Y8ScMizfYCGJh8FHDqLnSSkIKHL2fh9XYWO83gBIKKDUXPPDpiwuPXA/MWG4cwzIcYXns3noHEvGnGCwWEYZIEni55MBeaFOCZx+kPXAmpT/nmGFyGj4s= 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=MCwMUDu4; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=QAOmOzUQ; 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="MCwMUDu4"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="QAOmOzUQ" Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 42JAHTiT010230 for ; Tue, 19 Mar 2024 14:56:56 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=9cvcdPkzDOKHXbZ16Dw0Jut5AlVrhaJalG+oMu/J7Og=; b=MCwMUDu4X+PpSYwYcnu/bZ2gaj+xxubVjlU1Gh+gOQnsuesomY7/RbENUY6K7rIF7I61 rMBT82o2lOws1x1HXzIV6JmlyjRcvbd9sftsy42+V6VujbV6beg6ue3x6Y2J390wBW+m +3y5nxMe3urvAAJjgdZ+owK3RkZ4DjBWNvXDGZx2ft6mcIaZcNWhx7cXjMNLZV1+GMPk oaLlbgDsIfQKauCl5TTVpMzV9Rjx41BJJLtPqpFfdgTDsL2c3yvt7h6oPiZZJUEUmNsf KvdVfFpqkF0Xa1apBKxBTZOYYELQuDfeU2mmTy0Ope4gyQ6cMxRo6PpDPf0RO1Ue2bgg 0Q== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ww3yu5kus-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:56:55 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 42JE6mIp003612 for ; Tue, 19 Mar 2024 14:56:54 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2101.outbound.protection.outlook.com [104.47.55.101]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ww1v6c7hc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:56:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UK8JnLA2oGRzhYzMhdOoslCoZ+Zwn4ANjLv9XknkiTUyr/BXeW6A4nmsGhWC6ddDK67n9LfdS9HGzG+KuHMVP/QTu/Yal7kxL5jQkrklw3jKqVUCHyv2qFxn6KMYvj8nIZiZb0jRrkwJuZxDx5tstGqSfKcxsBCOQMr7o/6hx6estkHL9/Db6JbfgJP2f8atq8TQpiW1UBDrTcu8fylHLtmXQc3QkDc9DQnSQecke6QxaM51ffL0GPqF+4Z2q8Q4hv2IQM3q8TcSpdsvQTeIqbzt6i9Jgfj3ukRH436BGsgQB1AcHs2mBcFeJON4r/ZsVGFEpwUBKwilI9avHOnvFw== 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=9cvcdPkzDOKHXbZ16Dw0Jut5AlVrhaJalG+oMu/J7Og=; b=kMTyt4ICiw3HLgwnzdsFc0cs2bimXLIYGEfzgSYFBe97UAZINy+pA1/enWY8nLYWqa13i/RSK1g1W7V3on8PW5aLQ1iBk41vGCSerjXKJX7vzhN2fUw6o7gt/Gw+yNcN+Uq5cDrRjDnPkVmn/vWMyKP6OsI7RnaWKbSzKVUh31PDrk1XFcEYmEmqDPI3FdV/0mvg0+7qDUcpcoHayOzL1ftxTwdWTKKXSAzhX0CPdsGFZ0ng1lMbG/Uz1RCZkp0IViykTcEYxhFmsrorM44XY8HtoXNay7ZzJl9UAcHmie3BZMKEdVgPh6xeLnT2o8pJxkrK1X4j0pDqcWsrJTROAQ== 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=9cvcdPkzDOKHXbZ16Dw0Jut5AlVrhaJalG+oMu/J7Og=; b=QAOmOzUQmfppttAd+PHDWxO3sdnYHYjO1jabQOPyTz9MStcjy0xM2H0JhJIbmps4buqDF29Qbg3nGi8Jqz4+6eVVLq7DfDajOyUzUq9t2mUACRjtWNmyfKjv12aZ16mVLnT6eN9LrmVXHRl19P1PXDIv80gClt7g5AZ4/esNdio= Received: from PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) by CH3PR10MB7460.namprd10.prod.outlook.com (2603:10b6:610:15e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.28; Tue, 19 Mar 2024 14:56:52 +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:56:52 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 06/29] btrfs: btrfs_setsize rename err to ret2 Date: Tue, 19 Mar 2024 20:25:14 +0530 Message-ID: X-Mailer: git-send-email 2.42.0 In-Reply-To: References: X-ClientProxiedBy: MA0PR01CA0108.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a01:af::13) 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_|CH3PR10MB7460:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jTx1yDqpGDecMX79SXDnrZYgiV5w8jK1sqqzuz4YvW0uJla/GqCxzHyO3zlHWWZw+RTLsGw/0WBFMhMiG1mR3UcL3dbSm5OirczH9pXCtd816C9hQG2QVEicY+ZzyeSHam57FrVDjsYuUVkAgRn5FPeSJaRJ0ACu2PRY9wtW9U74Wz7nZ6fnFzZAy/vFekX6NMU4s/n4PP307ZDrxvLXxy8PjoCDSqY3UsfzEVwvNX7kLsMiuJrLXuQvxaeptqa5lLlc5Sas9vU/Ut/ZvQVagv2lS55YJysL+aolvB4x/pvv26+42J6kX9jfeiUk6cjx9J/aNrZlM/V4KidOsACcPWzDlR2sn6BfujCyCLeB/BVEvf9E5npSoz291J6REsMGAZqUDqqQI0/yb2khxAgAkE4ZrwtZNm8FP5+Qh8pKeVwB0my2h3C7fwfk1hJ5B3Un5t1vytoVxUKtKKdVz2cJet49hbX6reqWK9pzyOxFFkMLrrYPROzIGxc9BijBHiEswvxgCw66+c2Nh+mezi99qcPuzGDbagCnkb5WOxJl7rlckZreqkAhTG+uKAsGmvv4O4neHbc7t0JkhaoBT9aay80TkLkrA/okVAMGkZV57tnJ91OJi5xeCfJzQDtjMXsb0lnlNJe/4ea/8/Fi/EJRSGk+wbHTQ+cL2wEd7hgutTs= 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)(1800799015)(376005)(366007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: YI2gnoSWJuK5UpDOI+w9jUXjO73c32c46Ten28jvb555DWUKikPauhU5VWIk3MfZfg5lU5xuwSJFna7vbPi8D5JUWL8La5GwUQZH2yGpVP1EjcVDp7h/tI6nM92+WBfeHvR8BnBWKut0dVwazJ5I8BgqNqg1H4KlhRrwQucNhIkcuqCTOwqDRFeQF9Y3aZDR4FTsvqRS1gDjPVCybHCWRRN5762F6MBF8qUf+W/MbairFgGtQzy9/EnK7pprK3E/xCsdyPKVrcIR48wDaxfwExlFy2YTKwhEy5ixaRTPDFJrBJcOhncSfc+9wu9u4GRkiSZi8mLX/0/T9A+6BbTMRhicTnPuFOlg/oB/y5d/86b5zJ4NXr+OllKPx5WxBfAeCBFYI0n/9JrMlsiYW0h5tQBfR6mvsKD2RnGNc/FopCNS8Kot3dvQyZgd28csFWVpDimgRjLDJB9j57q0WguuPn6OUvwpGfAQuG58shr96Id1Gw2bbUs3kNr90/PwuKcMNf1I2G+FwoGXW+wSbYPUf4l4zPhoPRGmO3Z/8i4blUva0raMDXJx8izznovqoQhj0Jw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-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: FeNOGtt0ojfE7ExHvYnDTx3LxY2YfgfkmIpDrxk9HErpZXmx/Jx+xh/2hbhiI0mVpMzon4cnpFWtf/Ad0HOAcivo4OHlwM4KwOzqRzhY9ohjASjoUpwgh+axRPUqaP+1vBVunIA6iiDkxet9VQTn86JOYTqH3T2pUiMAzxOeTf+N8NlbsAO3Nv1f6zlPk7lu84tr/Vs5zCTlx9fvxbhVuN7U9GcV/P7RRHat7YcH4xlRkI0iz+SFyIqRnptYXfthfivq2kx5uBQinodnhH0F1Kpo2JAcHUMxPv+ecuETSf2JWD6IEtbJRoryItAeKGrJB3ZElwiKyhlcrfiRZvK+cECGXY2s7D61cNQForrZHfNKY8myW+oTfZHtpi4mBUYupmdvzXpA7sSFgNLSP7gmSu5HitF6iRW04wV40yhO7C6BS6qhCo288TKoROdSgfUoN9WMbT7uWT/SwFWhAStKqrGWDh6uKcBn2qFshBxBWXql5Dux8rkjcDygPX1w3ds5zNGnPM7gV2S5IStamittgdg1oBVhS0jLAEtUYqzaDKnV1BsRAvfuF+bU+JRB9iT5V5E6rg3F0IYCngDxhnKrAda6k/vOajVIoNhJGqstjzg= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 96d0ea54-e569-4937-e8d2-08dc4824cf95 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:56:51.9574 (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: GCH051vSDliZEcTW25EjgmSEQuQ3BGWx2f8mKFJS9Ekr5m8GP/vtcCIePY5QVrGgVqbmPNTY0KB9bUwJRDRGzQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR10MB7460 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 mlxscore=0 adultscore=0 spamscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2403140000 definitions=main-2403190113 X-Proofpoint-GUID: F2Zofn_fC2ajoEweidk-dBuPSX_zWiKU X-Proofpoint-ORIG-GUID: F2Zofn_fC2ajoEweidk-dBuPSX_zWiKU Simple renaming of the local variable err to ret2. Signed-off-by: Anand Jain --- fs/btrfs/inode.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 27183225ac54..952c92e6dfcf 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -5077,7 +5077,7 @@ static int btrfs_setsize(struct inode *inode, struct iattr *attr) ret = btrfs_truncate(BTRFS_I(inode), newsize == oldsize); if (ret && inode->i_nlink) { - int err; + int ret2; /* * Truncate failed, so fix up the in-memory size. We @@ -5085,9 +5085,9 @@ static int btrfs_setsize(struct inode *inode, struct iattr *attr) * wait for disk_i_size to be stable and then update the * in-memory size to match. */ - err = btrfs_wait_ordered_range(inode, 0, (u64)-1); - if (err) - return err; + ret2 = btrfs_wait_ordered_range(inode, 0, (u64)-1); + if (ret2) + return ret2; i_size_write(inode, BTRFS_I(inode)->disk_i_size); } } From patchwork Tue Mar 19 14:55:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13596738 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 6F5CD657B5 for ; Tue, 19 Mar 2024 14:57:01 +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=1710860223; cv=fail; b=skL2Ch1Ay5b092Mevj9WE0c44XIXZ09HzbPBYF8Om8DszpJX9kDszoPictAhSGG5ENye+/Z/k4g55wQGRK8ojKm0Dz9xzl1n/O4QsFP5LxiT8yWhBxON4oKr5L7ZTcER/jJpWlucBOwmkATPUQirYUv1WmK/XaGK+8E5V3vh6Bo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860223; c=relaxed/simple; bh=TWXmomw0F1SQM/vBUMG2u7vYz0wptc6EE6D1AblcIOo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=LlbfGHwJyPiUnVsyzAvnFX4z8qkdftnOBiv5iJqiG2f898afXQTLBeFW0gi4oajIxSUUWFn8GAxynlZOkjVUSjiQrt3ck6Lm4IhwX4H/n73zYtjhLnwuX4tDqKyWr4Q1wJeUPl/I2zacAzpGkG6xN9t/9e7FUkU27wKyl6+oMo4= 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=VQqYXj2h; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=q5KvSb6P; 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="VQqYXj2h"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="q5KvSb6P" 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 42JAHns1005068 for ; Tue, 19 Mar 2024 14:57:01 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=Xdbm0TVvuw7hZ9oVffHRXuHYrdRNme9J2Czw5BAfO/8=; b=VQqYXj2h5NcazWZYUJ0+Hx1+MT5ON0xjx+hhpwmcw9kqef1R3lqLU6aWtkHYK/IjhUav 68fYXAIpym47x8kRm2+pcM6KmjuXIlGim13LhPnurfeDzopzGOmEL4+V/cgHuWSpbri3 SDjyrRf1NBkp9bhlXrKsFP03rHix9ONmi/GRHB7pOVK7+MofyesLKmgnlLGPfa2CY3h7 8/yWM2mdmTvIW5J9dfW3F5FuotrDkZ3FTEPpLGMIoNcViVxRHGxzJI3REHN8LVUvvEJw kx15teeHfM4PMt4xLjpcSohwBxaj5ZUPdMEvbI6QH/JtoKgBWBo98tMtdwFiGxJ22Pyb 8w== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ww3aadneu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:57:00 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 42JEo5KE007490 for ; Tue, 19 Mar 2024 14:56:59 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2101.outbound.protection.outlook.com [104.47.55.101]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3ww1v6cmtn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:56:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bXAn9ztWAbxf+yNpyVgAoRY5AQSKuZdPuTg8Pgqa1qRsKRdg6ItnkJ1+VXYKT0vopgpcKvekXi2/9sGYUapRoynkUceOMBaPKoj9lsKkd1hDBih0TV1SR+aNtDDb9fNFoRIu/+dLt30N6ERmHizn9in252o9qo2Folc4CAsH9eEHhgsH/eT6t4OkUtdT0vxflo0ub2mEsd0i0Dj04yFxSkhYotyykbbkjwUrmde0rawjtA0RGSVrSbK6czPB8N5tHw3Ndvvbw0k3GH+UncBvwPO5SDT3uNX5BTDqw8LfTPfqM88hWbJ246I3ftgn2zBOYxnsBwLpD0XZfGsKW/szFg== 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=Xdbm0TVvuw7hZ9oVffHRXuHYrdRNme9J2Czw5BAfO/8=; b=IWjI8i6X+vQ0zJls5QuIM7zSNL6LhA2RgaHucs6cJ6zepd96eCMYtNHMdT3klBxW6ZfIF/xRW2QDiA93kEEDYKeNRxCr2NaHurOgWiToDBMjJtsvsunzBrJ6I5XSdB6zjjep1UxicJDDE5Qa2xL0NK6qkVA2cLlSJdCCNFvV3h0uw8x0AJLApTqliNrMu+7js1N27LRedM2piBD7dAVyK7/j0M34xxnF32gCraVhc8tgnkvjnPSJmLAAS9CSwBsJ1PL9yRqAJBghNepW6ImMdGVNrQJy0ckz2SgqVonKNScdueV3uEuOUzWtiTsQNx/h38z2nJaFv8f1e/QuvdAA5w== 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=Xdbm0TVvuw7hZ9oVffHRXuHYrdRNme9J2Czw5BAfO/8=; b=q5KvSb6P/AV0MLpAjtzqC5Y1Z4YxQlgbVw7D0pAnGIBlRNY8uXPIvJwIaxO9jenDPl2erxlOygFYurBwn/Rjg2FVnoOSQ/d4SJBvC4+P1K64k90guuU59bm1/zfcfmBFoirC8uTqqaPrD5HvT8LXCH7bk9nd84UyOOwI3na+kkE= Received: from PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) by CH3PR10MB7460.namprd10.prod.outlook.com (2603:10b6:610:15e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.28; Tue, 19 Mar 2024 14:56:57 +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:56:57 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 07/29] btrfs: btrfs_find_orphan_roots rename ret to ret2 and err to ret Date: Tue, 19 Mar 2024 20:25:15 +0530 Message-ID: X-Mailer: git-send-email 2.42.0 In-Reply-To: References: X-ClientProxiedBy: MA0PR01CA0103.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a01:af::17) 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_|CH3PR10MB7460:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5dwGBcdE3muXzG0Zg5w1/CGi7bqB+Zp0pGeB+CM86bNBNNVEIdDAPXj7tm55A66hi6R+JC3pVhHeQ8Ig0//UMgekhUd1hbmf4CQbAtXy+a8IJ+c96LEGfLCOASQGywC5DOujOFSDJXKZCU5n9ZBNx4lKJTcM0QtZv7TRWBGA4/3KDaxH7UzzWdqAhaleOct05FNteEtlaYXGHQOezIhcNf7rLM9cxHq/B91MNDDsTYJXo3IsSpg+mRyWceYfMVfbYVA+VlKbyRVjLjPaTJW8XWFLKFZrxvlYXi31OgTPvHcutUE8U1h5gQMqith5e8ED05jgFUnU2+gUt5LP0KY2y9JEWfbkh4lJEfOaKxxJfg/aI4ZrizrGF43ZYZY0o00yjnjBaHb2SbZl4DoKnx9NKIQccAY+5+PIZOAMx6lUtAon+eMN7WQmUoYzj7MXhfiEHM1vTNISlJw1xBoH64N+7zfQtLvw/3qn0tLOMtXnYIHHtEaRe7TsYt7ixkq2kHunneOaSXuD0cDfwPnJmkF9VXEUoeowO8GKf+0sHR4SQ2FC7SaJ2HSC9yXn4DVw3IWaYhgKgGFv8Szk3WKPWKCiXYWgC+2moYe+JK7AnK72MO8oTf0QeoLXUMTPI8JaxA4u7W4a7xaQjsQQbzMp6R7X34MIdks9FZVe3g5nUPctJjs= 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)(1800799015)(376005)(366007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 9gEiC3DW1w6wVU0XehAa8c9GCbboQyE/RRw82FpY974AVTn4ScR1eDJlH16waQd+zwh6wYQ+eBXa6+DDHr/biQqUv9gTLVnegt/2YXRGmwCLxzZI3uUtsbDRSJpgtFtYgLtCsyhIn5E74VcTqaA5EMqioN5wcvWyf5BQqpyZm3mbFpL/zI/I+FHj/0TenVie2nINEhYwhHCeBoYZMCf8ToiFSjP+m1s6CSTPZjjfHAGAKyXMhnqIkHlqdk9/YHpw1fWXsbx4GZClS+phfo5MNc9i72r1/UhoWBy3umcZaVjZAQFwxSkdMO/e2480d5E1sTA7dyr/srQYvjIgM+nNomQBdg6vE1YR7SL3IJ5+B/bXgDSuvQ+hlolXqF0wZ4dsD+ynH6V3d/Vl8O2H1jGeLjitIF2nojZB3Cn3ay5qMueK23YsWt+Nv725VhGtfXkt3Ako7pHz/qT3036c74p0ulBK79p2riDJVVH29KMBqGHYdTX47I9ep6mubhq6S0FT0MIhj3Q1zTZP2+FqiQdD5yCbFmreEV75/+EnB1ZmdanJXOXKUw7SwaIxWD9Vj5NFo+S0xh19BGLeXUZB8gcpml1OO9UgTCDSQinFrKb6KXWuqDp/+RU1iKK1fPF7T1/1hVtbKto9ByfUIXfeeNA0NBnh5sOl6Vwwzx035wfncnXOjGUiW3YaDwZ4y0mCDL0iHs7OlBWzKsyiTFzr4D7lrEh0jtKzaajyylcnvOHDUMBWkuABGBRcTCfW9YWdosvwVH39J304bqWLnMiuTiSnV/w6YBrySDDBQmsm+jeZHTx7NTVTZtU8zzcWsqLzOm37NsDSgtiiUg95EjMy1TtNCPz32Fsm5K0cwgnmWPlScnIJfe5v7bi543XOwugGO54jWekMSl2AnIWYcYSBHd5UBlTWBm7bcgoD2KlyeCDlu1AKoqF/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jcMc5OkyxzzHB6jpCEBeCDw9JBc5/J+vJLBJjoh7oNtMzhG2SwzjBkz+S4MtrrtnsBR8YTajc/8n8iOJ3EqE2sPnrcpH+fn5rXwuxLz7x/Wh2tSDN9Obt1JoOvnWgp1nzJVa2wdOIeM2zFYcdXooZpUmcEsp0DUqfxpNj+7TC0+2l0sG8vzKSIWTQD6r7+4gI1QYvS/vSvIrO9A92uPrMhD/TUAGBcZ/TvbDVywvoDbrPlC8OM1h7f6jZmkdIoLbsH3Sw6Zgz7ebqm/Pth3Vt/pQgBRZ+95xj8QxeoB0UG/yDDkDJA87VN2T+Fxaq+woc4Qj4LNsximWpyr8nendLY= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 64154b6c-6879-4153-f39e-08dc4824d2e7 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:56:57.5884 (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: /eQGk5OE1oOUgPz3P3fLEnws0CUg9SOzDh392T1ib2XPkgL+FFWDUBZZB0mnrcKtJ2hzbgf8WDFkWxRCpqxkhQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR10MB7460 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 bulkscore=0 mlxlogscore=999 malwarescore=0 adultscore=0 suspectscore=0 mlxscore=0 phishscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2403140000 definitions=main-2403190113 X-Proofpoint-ORIG-GUID: JS-pFTmkxn4qQOrPYnugJihXFxk3BaP7 X-Proofpoint-GUID: JS-pFTmkxn4qQOrPYnugJihXFxk3BaP7 Variable err is the actual return value of this function, and variable ret is a helper variable for err. So, rename them to ret and ret2 respectively. Signed-off-by: Anand Jain --- fs/btrfs/root-tree.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/fs/btrfs/root-tree.c b/fs/btrfs/root-tree.c index 4bb538a372ce..869b50f05f39 100644 --- a/fs/btrfs/root-tree.c +++ b/fs/btrfs/root-tree.c @@ -221,8 +221,8 @@ int btrfs_find_orphan_roots(struct btrfs_fs_info *fs_info) struct btrfs_path *path; struct btrfs_key key; struct btrfs_root *root; - int err = 0; - int ret; + int ret = 0; + int ret2; path = btrfs_alloc_path(); if (!path) @@ -235,18 +235,18 @@ int btrfs_find_orphan_roots(struct btrfs_fs_info *fs_info) while (1) { u64 root_objectid; - ret = btrfs_search_slot(NULL, tree_root, &key, path, 0, 0); - if (ret < 0) { - err = ret; + ret2 = btrfs_search_slot(NULL, tree_root, &key, path, 0, 0); + if (ret2 < 0) { + ret = ret2; break; } leaf = path->nodes[0]; if (path->slots[0] >= btrfs_header_nritems(leaf)) { - ret = btrfs_next_leaf(tree_root, path); - if (ret < 0) - err = ret; - if (ret != 0) + ret2 = btrfs_next_leaf(tree_root, path); + if (ret2 < 0) + ret = ret2; + if (ret2 != 0) break; leaf = path->nodes[0]; } @@ -262,26 +262,26 @@ int btrfs_find_orphan_roots(struct btrfs_fs_info *fs_info) key.offset++; root = btrfs_get_fs_root(fs_info, root_objectid, false); - err = PTR_ERR_OR_ZERO(root); - if (err && err != -ENOENT) { + ret = PTR_ERR_OR_ZERO(root); + if (ret && ret != -ENOENT) { break; - } else if (err == -ENOENT) { + } else if (ret == -ENOENT) { struct btrfs_trans_handle *trans; btrfs_release_path(path); trans = btrfs_join_transaction(tree_root); if (IS_ERR(trans)) { - err = PTR_ERR(trans); - btrfs_handle_fs_error(fs_info, err, + ret = PTR_ERR(trans); + btrfs_handle_fs_error(fs_info, ret, "Failed to start trans to delete orphan item"); break; } - err = btrfs_del_orphan_item(trans, tree_root, + ret = btrfs_del_orphan_item(trans, tree_root, root_objectid); btrfs_end_transaction(trans); - if (err) { - btrfs_handle_fs_error(fs_info, err, + if (ret) { + btrfs_handle_fs_error(fs_info, ret, "Failed to delete root orphan item"); break; } @@ -312,7 +312,7 @@ int btrfs_find_orphan_roots(struct btrfs_fs_info *fs_info) } btrfs_free_path(path); - return err; + return ret; } /* drop the root item for 'key' from the tree root */ From patchwork Tue Mar 19 14:55:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13596739 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 1C3F454FA0 for ; Tue, 19 Mar 2024 14:57:09 +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=1710860230; cv=fail; b=YXSKxv8KuN3qAhn0swCgPxLv3kxf9lfwN+XDxMzuS0sL8bEBDlLZC4P8plD+rBa8ZxqcjvoIeQlWcQgimEnFH+UhRj/p4s1QR1ik08Bwg5eiv/S2gJG0UnXBjpqYXrUnaWBfsh1e1cFKZLj5qxDgvhXZ6+pYSMRMFKvlneAHCZ8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860230; c=relaxed/simple; bh=wZwnBX4UgfUrMFynw5IukvUWkBxgL10B8p9SEuFZktY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=j12P9mTB51dKfPlVWSjfqP4amhiteU5R+/3nnaIhJC8IPgvTiNahE5+JfsOvwziHXDpeynUetmO+1/I8Gyg59ktcZTpdYAqBmJn9RDuvQo1ozid9SB/iieHYOja8ecoe9rrZxKZa7ITdx/6ZSLXPQV3ZWCx4gzPBfE8m6+WYt+g= 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=TzVhds26; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=S/926Gss; 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="TzVhds26"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="S/926Gss" Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 42JAHU0J021005 for ; Tue, 19 Mar 2024 14:57:08 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=7XnEnGDHTSXFSBl0yBiKecok7eaf/76QZfkSnZQXXxE=; b=TzVhds26+DzK1KnMJ+oezVyxXy1oKel+jT3R4hOOhvTgxLf6rod1ruJXNWRnGoZ9MS/q 8AeuHl9b1UJHlEt7VeYafF8FcPgdPqG8bCcGVo5r1FDToWVTop3OlCKP5XzMann/1TpC /qu3iDlvH5U/N+aIodokwgCxKIYEaylis7aS5NfUsO+m3uvBrDzojYYaAK6SWmR0LV8h +jjAwwqdrTe21RF7PpNfZ0gLX+QDWsn+NVBCui2c8j9SiiR8OvhWnrVcDoabICGivNLc S1bvKuhKnYN/MRKeEFsePRCR4yvLruURlcmid+/ZZYyyeAR4EfnFfJC24VFS4eqn19hj eQ== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ww2bbns1y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:57:07 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 42JEDZ4E024144 for ; Tue, 19 Mar 2024 14:57:06 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2101.outbound.protection.outlook.com [104.47.70.101]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ww1v6mrau-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:57:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c/isTdlyIQrtwRZCj/23vCowlevbA8dUAK70EKPXZdBNC1qei3DAcOdqaqX+768RfVr3VNEBF71Zi/RePb73uO+geE+z4T+AZXQqO3xd2dxGSCclP8WoQcj+QCXi8JPXyVbt1ZMjEqyrlgtHsjIZFK7Fg7YcY2N4aeC8MNZkPRiCzMeubzjlHprhdXpNib5Y2yoRWMgnBg2K8PyHX2efEz8cCChWqoTiJfvBJ3Oo504nIAOvLjoE0m33j594f2uylR+R7t4b79xsAETFLnCtADQf5/a1ZDIQ/KmwEG0FXa+vLyL2ytiIt63djVFBwK093KVkol/aScXVv05yRayYSQ== 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=7XnEnGDHTSXFSBl0yBiKecok7eaf/76QZfkSnZQXXxE=; b=Y1YnkzOiau8yVoq4KJ329QE//zr8VyW2VP5qMDBfvB0n8EkzzpJstMTfAB6L+2zkufN0oSGPyiSlomtK95m0uqsvq1GOY1+KdEwnIaiShkhFwHcWZ5xpSy3sFpwLtGXMNVgEYEIuRXTAXj6KKLYQAIwyamj9LmtnaFd1jBUbhkJ6d1bSNGRQcbdG78opBn8EL67+30fM7Owa7j595kDFvur6p5ckMnjHVcwRov1TsqOSBXwzGG021SJ/XhgV9mSk5F29J9IKw2kW4DLajMvxZtU7T4UYgxSvWFau8oLfCs8qPI0WFEGAESNGFLfujocpkVZUli1hz/WyYH+hrds2eg== 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=7XnEnGDHTSXFSBl0yBiKecok7eaf/76QZfkSnZQXXxE=; b=S/926GssKP01VJvJEOXYk/3C1V9SdFhG1C/usqZvbCBiQ+F94eeGtkssuP/oK5IG2YPYiTGl3usbzdndjC//VcOSE4osEmJFaMgpAwCtIIFKkqVAvOQj9n3rYBCcrAn+LtEnTflzIJzdomRFBq/uaNifhlULZknYGpHdgF2NOiw= 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:04 +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:04 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 08/29] btrfs: btrfs_ioctl_snap_destroy rename err to ret Date: Tue, 19 Mar 2024 20:25:16 +0530 Message-ID: <5c15288e61a39d24273b402721be934e2e400368.1710857863.git.anand.jain@oracle.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: References: X-ClientProxiedBy: MA0PR01CA0104.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a01:af::10) 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: GH74kYL2nNG37umYlWd/FBqIuBb78fi7AnefZZwcDpRwboc70vjii9q175pV/a/XgpQ8mWrj5hjjwTSYaywXQEMIIrE1EaufV8FQi+Iwv2Ml4CZh8RvhjpWh6Op26tONMzrhgA89+iP+9TGHPT6DZXlWD2XR7oULdqGf3oejsfOoI1yNEmhzw8orGadJpCht1Oa2xeRiDsU6uEmJQ3+ZXjatEBElj7BKStfa2tlaoa9cyakdoGY5lBzKROp/cv9MiBx29gXXPt4TckNezLeRsDSybrk6lxjZA2LJDG70Oi9Dc2OGqKWW8aPCRt1Nbd0WBeoWlsxrtUbs3hUWMxkICsPr+hHVak4TJmw5HH+Gb2O6yLoX9IpcD7iOGzqMqLtNDFTC+XHjyIcHWCC5G3wsZK1/VAhB6UQpvhOFp2Ch7rT74YzBJhnXGbA804vpnLxcurRaHHvqDi78kNYU8uTzlPTx0eUhKhX0cEECW70Sd/czXVvtebw2oveT1kCSJnem6ZLpPsqWP2A0w8KmoQv0+6F6Raz7b6k2lm9WQcByCX9qbJ5b9mIwx4Jme6QCPRd3oIKbr7CGPgT4urunYloq06zpmu6WaGtbWvx9XksNpOnKxMKQThAzEjaoXIX7dKKVIk22eEzXXvwmEaOhwlVL3nwheAI+vUABkkABG2G3bf0= 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: JUZU6AkHPWtEUYe9Tdd17jt2hNf4JC33U2SmKnCEBgYnwc/8zsAZ7tLHODl/By0Y1A8gzA1Hkza5U3CBgx2vd0v1oOQrNUm8hqPikipwjKrbbBR9Aro/JQCyJSGGL4gQJ0GUz5mlcjGWcihyTgQ5S++DOVKAcLF66LakKXn6cJHmxHMg1ofkOFZyGZK/3uE9U42AHP45UtitNPhH4qrSAdgkS6V6v9flCOAHeE8upiJxol7EZKC/70yYSO2JFQfCzwRA7IUF/PYInpoVA1xN3T+bc+SSHQn7kxZgV1vynkytnVM7h+0OhZ47M9asbKwuyRvvD7nFVwg6WD4Q8XggXyOJuFzBulULmgaU72lYie7GiKBxIgwHvXXvxd2A4g+LTn/LZVsblO53djdCQQd/40VzqZY5gG+xVIvjTa3mjznAEdiVYVjiGV5zP6Zh4I0izZD2Vd7qDpDdqE9gDIBr6X8zYa8G4bs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RxhV1Fyx678P88cJFKQz8AddhCQDr9yfwKaq6DiiG+haRWiBiwGaxrrEt4YfhTmIn3QmQD5IWFthWtIXrDV/vdZ9ERBDwbQwwRPo9/rEVblCF547XOVQO X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: aFY6Hgl5TWT+VgxfbN/n+8kf9dHh+vv/vBITXSF2MUeyKy3PBGaWRnKsOnvvcpxbIPMeZhZLwwhzJMXCJ0+5RDdurkSrpMtubGTWMKHiRag6k9g0RbaGBENMiM3X7C/5yLdZ5WLWVYe/TZWgVoQvQao97coqQXo4Tm2MPn8qIQyyyuzEJLeQGnA7hTAX1ycEAhziJ1MVsCo93/4/yj9UdIo9jTZ3VaM8U6yU/PYakGeH0tHOgJ4fl4nxHi+dredacYvfg+NDopSTDAZ5pi4XYm6kVmt/ZYVeZf6U4yQ/GabmhKDq0FnUhvUBlYKQicZbNYsMTb1IERXvGsMAZBEVUydRTD8WHHZwOVckhulmErU4mqRptk991V0N3Sb0mzEdnnovDFQWtDv5p3vornXoZLs7smfP3zC/htbBOXhNgftqtxARaOQRP/xp2ojhHWNsCb5/d8JTe3e+OwVw2M79+1fEbwQlq/d8M/1WbByz6JFRkpkSIocFd+s4oY7w28CQFxCASSFVTm2ziLBu0WDLNovO4OnUyEJ2205o8CzhIb9Mk6oyTN8K5C4Tmxt94gERphG82O0XnmfJGUpUwDkjAuxRlEJXYLUrxItOrkQkCQg= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 963f0f67-da2d-4254-998d-08dc4824d6bc 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:04.1686 (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: /7B1+0cp7bYN3Fpy/y6kGGsVKBTNZK6RB+HMP+/kbKBC+0N8UWc4f0CU5LYTdIp2qaCdhcT5LddlULfU295C9A== 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 bulkscore=0 mlxlogscore=999 phishscore=0 malwarescore=0 mlxscore=0 spamscore=0 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2403140000 definitions=main-2403190113 X-Proofpoint-ORIG-GUID: gU5Dp_ZQQ2HxQtq7Xfrs8-usDzke1A71 X-Proofpoint-GUID: gU5Dp_ZQQ2HxQtq7Xfrs8-usDzke1A71 Simple renaming of the local variable err to ret. Signed-off-by: Anand Jain --- fs/btrfs/ioctl.c | 66 ++++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 38459a89b27c..692f6ca9f897 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -2367,7 +2367,7 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file, struct mnt_idmap *idmap = file_mnt_idmap(file); char *subvol_name, *subvol_name_ptr = NULL; int subvol_namelen; - int err = 0; + int ret = 0; bool destroy_parent = false; /* We don't support snapshots with extent tree v2 yet. */ @@ -2383,7 +2383,7 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file, return PTR_ERR(vol_args2); if (vol_args2->flags & ~BTRFS_SUBVOL_DELETE_ARGS_MASK) { - err = -EOPNOTSUPP; + ret = -EOPNOTSUPP; goto out; } @@ -2392,31 +2392,31 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file, * name, same as v1 currently does. */ if (!(vol_args2->flags & BTRFS_SUBVOL_SPEC_BY_ID)) { - err = btrfs_check_ioctl_vol_args2_subvol_name(vol_args2); - if (err < 0) + ret = btrfs_check_ioctl_vol_args2_subvol_name(vol_args2); + if (ret < 0) goto out; subvol_name = vol_args2->name; - err = mnt_want_write_file(file); - if (err) + ret = mnt_want_write_file(file); + if (ret) goto out; } else { struct inode *old_dir; if (vol_args2->subvolid < BTRFS_FIRST_FREE_OBJECTID) { - err = -EINVAL; + ret = -EINVAL; goto out; } - err = mnt_want_write_file(file); - if (err) + ret = mnt_want_write_file(file); + if (ret) goto out; dentry = btrfs_get_dentry(fs_info->sb, BTRFS_FIRST_FREE_OBJECTID, vol_args2->subvolid, 0); if (IS_ERR(dentry)) { - err = PTR_ERR(dentry); + ret = PTR_ERR(dentry); goto out_drop_write; } @@ -2436,7 +2436,7 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file, */ dput(dentry); if (IS_ERR(parent)) { - err = PTR_ERR(parent); + ret = PTR_ERR(parent); goto out_drop_write; } old_dir = dir; @@ -2460,14 +2460,14 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file, * to delete without an idmapped mount. */ if (old_dir != dir && idmap != &nop_mnt_idmap) { - err = -EOPNOTSUPP; + ret = -EOPNOTSUPP; goto free_parent; } subvol_name_ptr = btrfs_get_subvol_name_from_objectid( fs_info, vol_args2->subvolid); if (IS_ERR(subvol_name_ptr)) { - err = PTR_ERR(subvol_name_ptr); + ret = PTR_ERR(subvol_name_ptr); goto free_parent; } /* subvol_name_ptr is already nul terminated */ @@ -2478,14 +2478,14 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file, if (IS_ERR(vol_args)) return PTR_ERR(vol_args); - err = btrfs_check_ioctl_vol_args_path(vol_args); - if (err < 0) + ret = btrfs_check_ioctl_vol_args_path(vol_args); + if (ret < 0) goto out; subvol_name = vol_args->name; - err = mnt_want_write_file(file); - if (err) + ret = mnt_want_write_file(file); + if (ret) goto out; } @@ -2493,26 +2493,26 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file, if (strchr(subvol_name, '/') || strncmp(subvol_name, "..", subvol_namelen) == 0) { - err = -EINVAL; + ret = -EINVAL; goto free_subvol_name; } if (!S_ISDIR(dir->i_mode)) { - err = -ENOTDIR; + ret = -ENOTDIR; goto free_subvol_name; } - err = down_write_killable_nested(&dir->i_rwsem, I_MUTEX_PARENT); - if (err == -EINTR) + ret = down_write_killable_nested(&dir->i_rwsem, I_MUTEX_PARENT); + if (ret == -EINTR) goto free_subvol_name; dentry = lookup_one(idmap, subvol_name, parent, subvol_namelen); if (IS_ERR(dentry)) { - err = PTR_ERR(dentry); + ret = PTR_ERR(dentry); goto out_unlock_dir; } if (d_really_is_negative(dentry)) { - err = -ENOENT; + ret = -ENOENT; goto out_dput; } @@ -2532,7 +2532,7 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file, * Users who want to delete empty subvols should try * rmdir(2). */ - err = -EPERM; + ret = -EPERM; if (!btrfs_test_opt(fs_info, USER_SUBVOL_RM_ALLOWED)) goto out_dput; @@ -2543,29 +2543,29 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file, * of the subvol, not a random directory contained * within it. */ - err = -EINVAL; + ret = -EINVAL; if (root == dest) goto out_dput; - err = inode_permission(idmap, inode, MAY_WRITE | MAY_EXEC); - if (err) + ret = inode_permission(idmap, inode, MAY_WRITE | MAY_EXEC); + if (ret) goto out_dput; } /* check if subvolume may be deleted by a user */ - err = btrfs_may_delete(idmap, dir, dentry, 1); - if (err) + ret = btrfs_may_delete(idmap, dir, dentry, 1); + if (ret) goto out_dput; if (btrfs_ino(BTRFS_I(inode)) != BTRFS_FIRST_FREE_OBJECTID) { - err = -EINVAL; + ret = -EINVAL; goto out_dput; } btrfs_inode_lock(BTRFS_I(inode), 0); - err = btrfs_delete_subvolume(BTRFS_I(dir), dentry); + ret = btrfs_delete_subvolume(BTRFS_I(dir), dentry); btrfs_inode_unlock(BTRFS_I(inode), 0); - if (!err) + if (!ret) d_delete_notify(dir, dentry); out_dput: @@ -2582,7 +2582,7 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file, out: kfree(vol_args2); kfree(vol_args); - return err; + return ret; } static int btrfs_ioctl_defrag(struct file *file, void __user *argp) From patchwork Tue Mar 19 14:55:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13596740 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 37426651B7 for ; Tue, 19 Mar 2024 14:57:14 +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=1710860235; cv=fail; b=m0Pmvng4HOe3pcIZ9LjScgFhilx8b1toaOQgtEgof1GRF/E58iSDMoo7FCGIhUiTUIPYDW9uLiDKqIyCggqSR1kR4NC8MkU0XzxadaODBGeYOKCzVFhjKuk8C+78Xh5/L9FwdGrsDDQjhyNDoQI0RVOhtGlFjkdsXfiFQmHgIhY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860235; c=relaxed/simple; bh=Fpn2aRoHw+2WMQDixALhzOnLz9WjYR9ZcKR9rbtONrk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=QAEEmcTO1D+TK9o5oxNlYdSNeye1bkQCPKNaSzs7XAVVS6QfSqUrIh03w1Gu8EYnGSsSC6SEa5bEHHtpNouvQ1AhnjqXsYgCB7wTDJxF/F92RjrJebDmcyNAwHmpx3SIQ4/Y+GRBSLBCGf3zJbIsGFVs2YfRIOG5D8RbHtfbgnY= 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=jraEuBLr; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=JcHL8m8Y; 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="jraEuBLr"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="JcHL8m8Y" Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 42JAHZCr010741 for ; Tue, 19 Mar 2024 14:57:13 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=yWOXTbQrx/cIWjUDojYyAFgn1JtuIvwdPyMPI4v6YbM=; b=jraEuBLrlWQWQcYWtxDrwo5bSEtEatrbCed3awz0o+YxwmqoQV1Hoy82S2Xx9r05EHmB TkUyErZY+PgYSCO9o5FCh6fBwIZReNPAMsZ2eMf7kqW3ZrIwFl6j0yh+Pupk6hXvPdIF 7FeZzVWtVLOgpUJEo16t+G2OUnVt4jRORLYY4iMpVejDUi/lcR8njBF4iVh4PYTE+r/r eORXTpHS7Kyvi/adNuIhBmLUcMLClnA+JBiHXAaul95JQWigvf+J/fPGKYsFj9v3IVuN JoGduyccFxrHwQkk00skQf+6ZoUlmMVYq4WgLbXSNgu6ru1asjajcDYZquQKgYY+e0+1 RQ== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ww2115rbg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:57:13 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 42JE2UnR007529 for ; Tue, 19 Mar 2024 14:57:12 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2100.outbound.protection.outlook.com [104.47.55.100]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3ww1v6cn3h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:57:12 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T7VuRomVnzGKQ4K31iLAjdGTOxJvqzCbbPFYT4Vfmb6Hv9eu7I/RtCFuL8j2miZpgSNE9G6n9HA08j54pPGrUE9PLUCPXtxeQNvTL3NNSmAiGoZoV2VEAcHsZ4hFPrv0ogkqrQBtY62dMt6npoMZNHT96S81zuj5bWu/3quiEyHZf5Ye9Qx2YE+baZUwIkiqJE4bw6Pq1t9Z6vEicq/VG5coe2s2BDOrGQTYsFOXzJrAtjzg7jFKwkX2HfTrUgZxeyVjnZqW3kzaDu7dxUBkd9BgEDNcBypFtbk8b+WczAwoNIZgrGwuP1kSw94L+5AH3UUJGleZsnmqYwt1Tvly6Q== 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=yWOXTbQrx/cIWjUDojYyAFgn1JtuIvwdPyMPI4v6YbM=; b=a5sIv9OYzoukbVq4gTM8c9ZqaFvQSKpOOyW9lwlAqgTHhXIL3+ogmgFntdX6GxxnTY9GBjmtfj4jaXAIruccj+rq7impufzSzbnzKAzuF7scBbTQJTIWZ4AMnQefQPXM2enaKnls7Kf61OrhpTpelTP/KRi/T7OPo14ME0A6lYJT6W4SQXliqG0aPeRJfrWIiZNNZ5pUzgUOzgB3E9a9WuWE17nz+7/c4OmXpTTasmM02ZdxsbhxGmhpmB8TBUKVu8soZTj1XZTBGFC+a7AlsVePSYue5gDUTdo8Tvyh2yAEkV10U4RYSqtefvUAJtrHaKp9OCWPXnP9FYvp72i/Yg== 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=yWOXTbQrx/cIWjUDojYyAFgn1JtuIvwdPyMPI4v6YbM=; b=JcHL8m8YnvFoAMJ+8TSxGKGdmXarDCs3hzbhpo1kFdMrcMdTvYBAtuZnzZU7As3rXaq/ptDyV9INJF606LqR+KC8BLIRPecS1qeoCqdeHCm1mYjMOyzReFyDSQSC6xnWvIcdm3rtgnY1Ljm7RcRMjp5rScJ+qq/+FVF78Ugedi0= Received: from PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) by CH3PR10MB7460.namprd10.prod.outlook.com (2603:10b6:610:15e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.28; Tue, 19 Mar 2024 14:57:10 +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:10 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 09/29] btrfs: __set_extent_bit rename err to ret Date: Tue, 19 Mar 2024 20:25:17 +0530 Message-ID: <169ecf60e4d061574ef0401e705feef54a370778.1710857863.git.anand.jain@oracle.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: References: X-ClientProxiedBy: MA1P287CA0020.INDP287.PROD.OUTLOOK.COM (2603:1096:a00:35::32) 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_|CH3PR10MB7460:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ey1qG/Xa/g/l7v3NUfWv7hvDTA3Qa41+Ko/n9ejmEi2UExO91DB4GKOk7BWR1SjNL2yLIgwb+iDAdygSTcr6pbStLYHkUUYP1Mxb/BAONFGmU9X31qnAXIKPCO6WHl5JiNOK13t/VREWCAoLEDdc/GUAvMUOz2aVuZSIv2xUaW/roPKODLqiaWVnLQGRXBW2Vdr5XC/OoUQmWhF3ZqB7p1TF8bC5G/vhJ41DOmpTL8SNEb07vhiemjvS2ltTs1WDEivOcr3QQhaqAsCgz7R1wN73B/5dlmiHZ/Lw8XzOgeH8Dly05lwipcdhtpW06X+QpGB5JCKSdDzZeowERSyOsaxxHpezSLmRn9xZEevf0P2sYP3iVRXb6tgS1Ef+RaFWYV7BpyOgN1wVzI4oOhD72GDY81jZM5AwLSQVZQTFenGMZ+v/oxQgZwHAQpbs9nXDdArvhpG1iy6Dkzsboq4rzx8XTCBWD8bYnaPXFcBeMpgKQ3rr+UOFzXL4+J4fUpAF1smqlrBp4y9aBj4F7dW4FGQ33jOUKky0ZNjLb88j2J4Np0+qhix243JJ3BOiuzhYb45xZ0Uas5nJ/9Wz9izdJFNeRU+bjcPOBw9sopfoY7g2UAXZMnxe2R5EfAd+qilxFri2WgkHTwEAE9T0rbQFDDtqzKgI51DGPggOZCRqqjg= 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)(1800799015)(376005)(366007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Df7TN6yO7czuRuK6XKvEd4NQ5wVb5HwaB3S+UIIUBImqr+BR/puZ2vySR+0m/PxeNMsUcqLNP11Dwai21f2xcDp+2t1PVCJJLItnluZh5Je7u50A0ujuY0mVojtyxP7W+YRUDYIKOQ52qBJhhR/hgO60ouENXiOfYXPRGDj0hUzrKMbrUCPAnXSfmNUzo2O1S5IbLYsCNb+kw1orNWiDEEEPYe2N+xMuielPE36tmGOjlvISsZlAkHsMKQ+YSEtiRcMK7CNjtabAtCQj4f/pZjKGeff6J1YIq0t9Xm7zivdS6aLrP4qPCfnRyRVbIKGzHw8BOwwwbvmD+Itn2bOV3ppfBPEKxCh50r0YPBbEjj7hleRIr+p8kKwKXTmue1ZeGyPGB8bv0VAowVwFJ1HiHTQmK5u+L0JwWBNX9kDxviDd9PZD58daPliQX9jPWm+Um/mUPSR0enTyV3MRNAgHjuGrPdDc2nY9x/sNI4KeqYVGWvo41LVNsPDSHPgR4CsBlSVdOC3GgCbUypKsP9sdg0a+zboO6UCCU1YZRySAOjh9hDK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6MZOI3rrYNLd70FvdEJfI7 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: f32+CQsmRr6Cd8HWikIJRpTjUvEqzDYEJZ79nrU40IQ7JV7efkPoRiO+/ek+t35V4+rs7/aKVZ4hAqa8bPKfOGGTN6kk120VoLHbLxmek2aQGOa26tQGp6vuYEX+nE8ZjL7TN4MZscfCVddYz8Dnb30nRFX98+2sYQq9FVG1SeNrvgADLXu4sXeTcEZYy6pBKME1JE6N/2zET48p+URL56bKfncA6AzUBP6HCAzi9sxMBl+jZKRZyHGcjzqKaU4S51cc2mgbBeG+IljwI4jSAg/lrMSlqDo0oqRL8hY/nBgyNo4yqwtHHV5UC5jDE6a2zAan7hCUoK5bTlm4COArT+cnMCBULpgqa/1SuJeziCKUTlGWhD8Wmi0mEkZVu6uIYqt4Tp7dTjPMz8BXB9YcCUybOJlhKHalDcBJW4D/vgu2E4tGe2gOii+blE6m7KhdtIJ/A78owMfuXsNyDbSajkcfpI5EVB2uN60AYjJ+8RMMkmSLGgwmv16xUlEHICJLtZyid8v1PKDSniuC44p60C74kLUaXcns2K4HWkItKgA7AHHcqdfc4rXyZttwRFVqqr85MSkIdnFFOdU6kukfw4OVlGmWJ5XHN2KsifcGlzs= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: d2746a1b-6d2d-4b74-47a1-08dc4824da7a 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:10.4480 (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: MJy+u4zgZBW25da9Zo2dnGYMESHI/ENksJnOASH8VWtnM5y0kKw5h8hDk8glqU9Np4oPFTHs8LUpxNpzHkB02w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR10MB7460 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 bulkscore=0 mlxlogscore=999 malwarescore=0 adultscore=0 suspectscore=0 mlxscore=0 phishscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2403140000 definitions=main-2403190113 X-Proofpoint-GUID: HQkHkkJcqnqiZlDEkgxhFmMPCU1s9VUr X-Proofpoint-ORIG-GUID: HQkHkkJcqnqiZlDEkgxhFmMPCU1s9VUr Simple renaming of the local variable err to ret. Signed-off-by: Anand Jain --- fs/btrfs/extent-io-tree.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/fs/btrfs/extent-io-tree.c b/fs/btrfs/extent-io-tree.c index c09b428823d7..0d564860464d 100644 --- a/fs/btrfs/extent-io-tree.c +++ b/fs/btrfs/extent-io-tree.c @@ -1059,7 +1059,7 @@ static int __set_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, struct extent_state *prealloc = NULL; struct rb_node **p = NULL; struct rb_node *parent = NULL; - int err = 0; + int ret = 0; u64 last_start; u64 last_end; u32 exclusive_bits = (bits & EXTENT_LOCKED); @@ -1122,7 +1122,7 @@ static int __set_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, if (state->state & exclusive_bits) { *failed_start = state->start; cache_state(state, failed_state); - err = -EEXIST; + ret = -EEXIST; goto out; } @@ -1158,7 +1158,7 @@ static int __set_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, if (state->state & exclusive_bits) { *failed_start = start; cache_state(state, failed_state); - err = -EEXIST; + ret = -EEXIST; goto out; } @@ -1175,12 +1175,12 @@ static int __set_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, prealloc = alloc_extent_state_atomic(prealloc); if (!prealloc) goto search_again; - err = split_state(tree, state, prealloc, start); - if (err) - extent_io_tree_panic(tree, state, "split", err); + ret = split_state(tree, state, prealloc, start); + if (ret) + extent_io_tree_panic(tree, state, "split", ret); prealloc = NULL; - if (err) + if (ret) goto out; if (state->end <= end) { set_state_bits(tree, state, bits, changeset); @@ -1224,8 +1224,8 @@ static int __set_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, prealloc->end = this_end; inserted_state = insert_state(tree, prealloc, bits, changeset); if (IS_ERR(inserted_state)) { - err = PTR_ERR(inserted_state); - extent_io_tree_panic(tree, prealloc, "insert", err); + ret = PTR_ERR(inserted_state); + extent_io_tree_panic(tree, prealloc, "insert", ret); } cache_state(inserted_state, cached_state); @@ -1244,16 +1244,16 @@ static int __set_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, if (state->state & exclusive_bits) { *failed_start = start; cache_state(state, failed_state); - err = -EEXIST; + ret = -EEXIST; goto out; } prealloc = alloc_extent_state_atomic(prealloc); if (!prealloc) goto search_again; - err = split_state(tree, state, prealloc, end + 1); - if (err) - extent_io_tree_panic(tree, state, "split", err); + ret = split_state(tree, state, prealloc, end + 1); + if (ret) + extent_io_tree_panic(tree, state, "split", ret); set_state_bits(tree, prealloc, bits, changeset); cache_state(prealloc, cached_state); @@ -1275,7 +1275,7 @@ static int __set_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, if (prealloc) free_extent_state(prealloc); - return err; + return ret; } From patchwork Tue Mar 19 14:55:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13596741 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.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 4A25264CF9 for ; Tue, 19 Mar 2024 14:57:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860242; cv=fail; b=DtfMvaxio0lPUrbzbe88BEExu7LbcKwySsXDR1DeFcdVYgEqhA309ByFvMNtkgxvp/8OOLa5WI108v7iQFTC0I0EduZmzFg31DWkKMtFJhoziyyG0RQf/WMiweuf5XHNlwQTudKJ8I0BFUmkLskKagU4Vps2O8ntRatSBiMSCRk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860242; c=relaxed/simple; bh=TkJ6s64HJVqnlg8cHIZcZ9VhZNAOs5XiJI5Ejrv96Kc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=Dzye9BL7EWN4otiSwubsfi8frTKknobxVfoJ9GY9vqsqn7KJoPCl7+F391MioRwiZnyBvv4Rbov755E7Wd+3phQYeK3I09w0D10d5dXEZtP8Jt9Y44GyMw0jzHJ0gbe/lu9c0CZ5Md2qBpF+uhCjO5T4jDLFg+MvWS8rWfZ9HZU= 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=n87WsYg2; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=s68Xk9Kn; arc=fail smtp.client-ip=205.220.177.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="n87WsYg2"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="s68Xk9Kn" Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 42JAIN3t020295 for ; Tue, 19 Mar 2024 14:57:19 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=rPzb4O9qialp2pTUsThaQCMa906tXytx3MvOKUtu6f0=; b=n87WsYg2UG1OdUK1Ex9jG2pJtu1B62JvrTvJkTrWPj4f79P+1LOOFWgfsiTOVc1hPBt/ dr49Kh/u30hGlXtr+7VqSK1acudMl0AHfK8zslyHJpDUyvyGmjNUqoFOW7wrA8OQ/gQG CVnvOggn1ETLjwBWMtxEUN01JKV/HZ5n2PVAUr8PERmyD1o5pyw5eE7Dqd7AsoIF3JhU rnlDMDzYm17QbOE1OjbDkFd5dPw8aptGAiSN8H3xdJJOXTBCFB+Dg6jo18gN3R5Dvsan AYivVfxvYm7voXzKdVVjIG1eNz3LIg5r0wPlB+6OfGjERMNP8n6tatzlLxQPH95iABOl iw== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ww3fcntjg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:57:18 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 42JE2UnU007529 for ; Tue, 19 Mar 2024 14:57:17 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2168.outbound.protection.outlook.com [104.47.59.168]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3ww1v6cn77-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:57:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W0uvDOY6daNJkFQycDDbDejfUm8MTbsNCepEwZ8S4U1KvnNbEk1ZX6fWg7K3JnNQxiXYrgf9ShhWagbG3SAjzPYZUG+URAQZwHjVnMq4hHtctZ2CHVWV6DjHcS0W5zAJ43OvTX3tHdoZIKSXkzGW7TNgmJNOOIw/ndZ5C9yAnWgFOVqPkfWirRJeVPmJgAg3QzSTTSYDFLJ/9zcUG2k/NewpwWjKRynmpR1+axuNoSMVrl7UNGVyiAgSCGvSqvTzQPCw2ZpHeHKdwJmRUmeRuzANjOQFKOowyYzgRjfll+6cNX5n85WLf+sgYkTyIpqtdxrKJqyd1y+uPL7CmXl7rw== 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=rPzb4O9qialp2pTUsThaQCMa906tXytx3MvOKUtu6f0=; b=jFAEDKdAB+A64ijHkb9z+Et/b7HG2X+3tr9g7ply7nzINpzgqzHrKqG7K0epBBvbg1nGTjyrSCNuP/BrK/UgKz0/PyoCCJBg4zzKJ9XVbYIuq2k9fJjHDul2nnI02J651lz2xEDz89+OG9PTb5etNhGQDug9s2bSXrT40wAiSrORO+eRI2sHPXg3A9Nf1W526vUmo68RNqqW6GQ5UQUJ6mwFKIlwYl4WB0PfRa/FZqKiS1QSxGPyRnWEDO7kVWG9NAdquVIkRRhSm26SJZDDxzDolMkeg8/uRemtcDOSTL27A6dFB2wAO/j+H6OKydlDnppNClAPw2xJhfzGQEcLQg== 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=rPzb4O9qialp2pTUsThaQCMa906tXytx3MvOKUtu6f0=; b=s68Xk9KnRpvqxOmqbXbhkG0jZd70pkrjN23yOjAsNiN0NHL5HEKMTBdFHvQbXxGWshCMUQRkOgD7yjO2lAXn7s69nYeNr2oqjsE2Kmoxoxe8VxBA4PtBKas1m9iGNL420p484amf1QFkd8TBhpu0KR2vDmMYGdjHAOc0nzORn+Y= Received: from PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) by CH3PR10MB7117.namprd10.prod.outlook.com (2603:10b6:610:126::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.30; Tue, 19 Mar 2024 14:57:15 +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:15 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 10/29] btrfs: convert_extent_bit rename err to ret Date: Tue, 19 Mar 2024 20:25:18 +0530 Message-ID: X-Mailer: git-send-email 2.42.0 In-Reply-To: References: X-ClientProxiedBy: MA1P287CA0003.INDP287.PROD.OUTLOOK.COM (2603:1096:a00:35::16) 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_|CH3PR10MB7117:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /6KXpEtGKnMCwyzFf7f0VEEZKxfU5qM39G9TfqWrQyhjyAsFyiWHZ8WcqKDHHlrxn1puwWGFAJ6Vq66Ju8t7Yr2emgu/sWqT5CpjSWdI579GqY7G65a3Ld076GJ2QnhilQk+mMNNkKQXjp8N//Pzg0JTM8APqg25rDyW1X/JlmbPsuoBxybyfB++rTkZ8fXO5CLaDhi1GWX1d5Io/HKKc3qW79IL/KbTjxC36sOd3soxlwO4iOGjBhAIY4dKZz3Rt+E0kCd3qKvzzEQH8oE40IarEUoVFmn7QSCef2sukmEL1SXRxt8tkTxPD5NeEV2deAbHOcB8K3pq/9OeAH4yqZgglN12cP31t5fk33PO6Mdp1FC5qvIAu5N+FroU4P6aeRwiqsCFT4612XPjsptTFTkhwY70yCtWTKxDfCex6I8zJM+efmQ+Hsl/JnJW3h71OmG2iFXR2eluJbj2Xm+j/9GQjlVE2hbjwOyWEOT2jUrEJLKdAt8EB3UxznTlAInHoVeErejE25SEqy4N//TidWLgvK+0SJlfSwn3A1qQ2HFILrSSVzTLorOe3WQyo7D8v+yXqkIhvnO+NzWh+A03qZs1dOSmUYY0T+Tg9zHP50EqH/PzhoPKF7rSNMrpU1z8b24WYOo9Ld6l+09WTjXJ9wcRcu3aH+Eg5Ky/09U7GFk= 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)(1800799015)(376005)(366007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam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J1Npycurcms3b+2T5cbJZWsoysZuqtpwmoaWkKS92Vz8mLI8dQOGRUPHqjHuQXQzfrJCy0CXBJlwfRn/d3m2Oj40ZTHRXWKpoqTqW79E2PXPupacZh6WUxsuurDI0ZR29eH8NGOjxiuCgXJjfJWlbpQ3hIBLlqwAd8kELitP3TQmThqY90Xf7p7G6rTeLOHbloep6Y9VKSX+W1bV/A5OELu+ZGVaEHaSCCEANis= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: d01f0e4d-22d5-4b02-327b-08dc4824dd56 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:15.2597 (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: gGUXerLw1sIDmJCJSc91DJLj01GI2BOlqnNyg+F0apOd9W0UOKOoNmq1fR53oS2sSVocRSjfcObcMgTc9AI7Bw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR10MB7117 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 bulkscore=0 mlxlogscore=999 malwarescore=0 adultscore=0 suspectscore=0 mlxscore=0 phishscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2403140000 definitions=main-2403190113 X-Proofpoint-GUID: 2duYGkBuKcengennezQKCIIGVIjIaFu- X-Proofpoint-ORIG-GUID: 2duYGkBuKcengennezQKCIIGVIjIaFu- Simple renaming of the local variable err to ret. Signed-off-by: Anand Jain --- fs/btrfs/extent-io-tree.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/fs/btrfs/extent-io-tree.c b/fs/btrfs/extent-io-tree.c index 0d564860464d..ed2cfc3d5d8a 100644 --- a/fs/btrfs/extent-io-tree.c +++ b/fs/btrfs/extent-io-tree.c @@ -1312,7 +1312,7 @@ int convert_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, struct extent_state *prealloc = NULL; struct rb_node **p = NULL; struct rb_node *parent = NULL; - int err = 0; + int ret = 0; u64 last_start; u64 last_end; bool first_iteration = true; @@ -1351,7 +1351,7 @@ int convert_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, if (!state) { prealloc = alloc_extent_state_atomic(prealloc); if (!prealloc) { - err = -ENOMEM; + ret = -ENOMEM; goto out; } prealloc->start = start; @@ -1402,14 +1402,14 @@ int convert_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, if (state->start < start) { prealloc = alloc_extent_state_atomic(prealloc); if (!prealloc) { - err = -ENOMEM; + ret = -ENOMEM; goto out; } - err = split_state(tree, state, prealloc, start); - if (err) - extent_io_tree_panic(tree, state, "split", err); + ret = split_state(tree, state, prealloc, start); + if (ret) + extent_io_tree_panic(tree, state, "split", ret); prealloc = NULL; - if (err) + if (ret) goto out; if (state->end <= end) { set_state_bits(tree, state, bits, NULL); @@ -1442,7 +1442,7 @@ int convert_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, prealloc = alloc_extent_state_atomic(prealloc); if (!prealloc) { - err = -ENOMEM; + ret = -ENOMEM; goto out; } @@ -1454,8 +1454,8 @@ int convert_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, prealloc->end = this_end; inserted_state = insert_state(tree, prealloc, bits, NULL); if (IS_ERR(inserted_state)) { - err = PTR_ERR(inserted_state); - extent_io_tree_panic(tree, prealloc, "insert", err); + ret = PTR_ERR(inserted_state); + extent_io_tree_panic(tree, prealloc, "insert", ret); } cache_state(inserted_state, cached_state); if (inserted_state == prealloc) @@ -1472,13 +1472,13 @@ int convert_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, if (state->start <= end && state->end > end) { prealloc = alloc_extent_state_atomic(prealloc); if (!prealloc) { - err = -ENOMEM; + ret = -ENOMEM; goto out; } - err = split_state(tree, state, prealloc, end + 1); - if (err) - extent_io_tree_panic(tree, state, "split", err); + ret = split_state(tree, state, prealloc, end + 1); + if (ret) + extent_io_tree_panic(tree, state, "split", ret); set_state_bits(tree, prealloc, bits, NULL); cache_state(prealloc, cached_state); @@ -1500,7 +1500,7 @@ int convert_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, if (prealloc) free_extent_state(prealloc); - return err; + return ret; } /* From patchwork Tue Mar 19 14:55:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13596742 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.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 BAFEE65197 for ; Tue, 19 Mar 2024 14:57:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860247; cv=fail; b=BnDU6Xe7n/HZXy6MdjZeT2yj7b+dxgxeaGvgaBu1tJL9P64XdUAlcMCKTYvCSw615vwi4KK9oIr+n6vHKdRfqvSSLtwKVaVYljYh0eGYpPXRwF7mHyPw0q6KrCaW8kAdDID4R7J9uB/JyW+YFF51oQYiSnp6g/vuAsUVOtJS14o= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860247; c=relaxed/simple; bh=itljSjdfWY7VQIHaL5bjRNSFlDsNhjhsJovFbOsjWzw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=RlSOy2c7M7+B+tE3Nc9+HL0gIBALRxS+QgQovh+xAZ9sXmwb8lIMX0m3FVQTGw1KMEbDLxlFk6Tm2i7dzhnR0S/9hMEhvkqur9LZE5Ep48TYxJsZabRbM4LLEgPSXNF9o4Ynd10rR8M+Xafk4jMBv75OhsNFDqDXs/C8PuiP+R8= 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=J6hk0jeP; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=Dm1JyY8P; arc=fail smtp.client-ip=205.220.177.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="J6hk0jeP"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="Dm1JyY8P" Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 42JAHbbP026468 for ; Tue, 19 Mar 2024 14:57:24 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=MpRrJmvTQRw/ZgxV9WHMphH/ae7MnChToQKP0b4Dxfw=; b=J6hk0jePzzPPXBzHBpBCKz88fHSTeiQD6LexdfpSrFS2H+mBp1eO9Ueyuh38FBVC4rTK QLxDZo42XEZ4kbAx+Djl3xgYhAFtpl9za9+A/pqi22SOLBhvv6tjiq7qjH2y3WZ0Hx8V v7uvHOYYVt7Yls1twHCOZUdJfg60S6jfjkchqL7oqIXyExyYiBmYjRfLvIXIBqhJTqJz WFK4RfthNkXaV+jJAHOiWuCn1h8m/RGwep6+W/gHCcIH6ZF1u2GaCSRCQqTYZN84KKKL 2CBBM5p098+q2J+Ty86jkvkycI/jPRTKQOgdxvGgAVsj/1xBDCh3aPI8kWI8ieeZYwEq 8A== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ww272wtu5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:57:24 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 42JETimC024156 for ; Tue, 19 Mar 2024 14:57:23 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2169.outbound.protection.outlook.com [104.47.57.169]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ww1v6mrpe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:57:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ll8uXPu1RVmjDfbgLUAb9/V2J0zV6z/BBkIFFUmWR6IDi7Z80q4d7EwkUYe2UWEkJdgi6wxGGBSQ3tp2FeirU7OmI6mYV/47lC/JmhO6BVeKKF2BgrL0F6fq9lcXDPeH2lk8iouo+KSswKZxoHKdE0wPfRkzcpWw/TKiofWZ8PlF7q/0n83lv0kBjlRCkZPiLKpQ2xq9Lx+4OLL1svIBtflpYisS51u8+88G4BD24vrzfyAkYys3Vp5DaIXiS7HxiL8x4KQYOJYmMxumnm+nEEXgwFmGMYN2MnWulIMczSy+STwy4+O+W1MuDaqouMeJE+K8OrrlLs8PTnKUuSnXgQ== 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=MpRrJmvTQRw/ZgxV9WHMphH/ae7MnChToQKP0b4Dxfw=; b=JATpmYjnSbNO8HxjZljBvSqeWwmcY4S3GgzOLIJwTGPZW1TaoeSNFbE0QSFGNcuweJR8RvObbqtI95oHv1OAw/mOKmqtuVi3XNxV8xSH9kDxHKLkiWQYY9IVJnjUYnjA4o+qOR2MlLcNmU34rT3EnLDc5lNEOcSYx+kw8+R4iP7ubhmTUiVk7gD3khDFh4xsjZgKsik/6enh8KwrxB2++ZawOS1a3esGPlD6/lWBRYNja1616Zkxp5+3PReiOiWZpBDvy9OEkd2efvFgy1UH4CAmj4H3Lzj2iRM4x4DLewkIPlipwnveG2SWfhYU1bQjdIRY5Pi/O6r+iNwv9wiDhg== 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=MpRrJmvTQRw/ZgxV9WHMphH/ae7MnChToQKP0b4Dxfw=; b=Dm1JyY8PPxm3insuvyMD2RXgeRN2mz6kqlVOh2rNny/vbDifsFpnDxa0i7elQSGC219hv728dIiXNvLRErJDq3yIUv2G1XogZHCDnAe0SVztc8PplYBSUTISHOid4mWAxMk24nwfailrEIKUN9PNE0/Ut22TTAK9ljajvqTnaig= Received: from PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) by CH3PR10MB7117.namprd10.prod.outlook.com (2603:10b6:610:126::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.30; Tue, 19 Mar 2024 14:57:22 +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:21 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 11/29] btrfs: __btrfs_end_transaction rename err to ret Date: Tue, 19 Mar 2024 20:25:19 +0530 Message-ID: <5efe4beec59e626e1290c57a55c041447d587642.1710857863.git.anand.jain@oracle.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: References: X-ClientProxiedBy: MAXP287CA0009.INDP287.PROD.OUTLOOK.COM (2603:1096:a00:49::19) 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_|CH3PR10MB7117:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zf2y5Tw15RN5SzxD7H7IWZWY22WvDSNGuGlnDM3F2sDvjDTUlDTccHWr7KMlbp5ZxWz4bxkhAkKX+9Lk27Xh0F9FoGSmaU/wIVexMSHXRd5E3CxNEmDH2Y3J+gKcEa9qhOZpjFdW3V0ejw1IGUmpHeXxf6aTVVqPtAdRIkxaF0VF+W9ROWZJszQcyOoN7k6a6NVjUlHXCRvvbnVIOipgKwsva2pZMJmbSByUfbvEgYk2jBWJ1u6qHvJJNOOEVIdHbgwn4cN8bDUThmUF7BxBoQLHWopuO15LsDqDgB/+IrYaY/j0LP2meC0H5613azI1qCu+Vb70t9r3gJmQ5GNrpilNvX+1heS0WcyVqVecjFhI8POujaJg7FS+YbtqJvnst0ZcddUYTzHr0GPmH40fPLCvV1teEFQjBKEMY8dbyyE6jcPIVGE8P1A8pgjC1eL0BdoVzakqYXNobpZuxpAmdu7yWmVH7yVB+F1+bjV887UnZjuXUHL7fH4GCvAOwvkNFmOsQYEA7eL1hp4w5feinx6WNh4xV8DPTYoCCPQpus2Y0XdholuSzJuZ2HyeWnBUkmfxxzN7enfNmIZddIHHAJhHOoGsh2FLVNd19rGdkLrl7e3tOtDZLD1bYMsZdJkNNWMEfT8Qw2bJD7ENw+XUEZfzhn3nFDC9gtF7Xc1Rfys= 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)(1800799015)(376005)(366007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: j/IXaC3w2fPc+NIN4UhCs29QzidlCbglhf4SrfePhaCmHbTJo9oZcoj2rLqHZsLIWjp8A9tSjSjTyHKhUflX43CsgajSvPXBoH0DfaMTGR42vPwGt9aT/2kwzgqP0ibSruWEaboO3gCfejTnL8VZRQ50nT55O0/dG5iDPAYwFSdhmIxCWwc7/iNfxvMu3lLRJR4LJXBAE582pNdUl/16lYuB448Y8CnWWVv3XhIEFaYUwcE1WEOOdwYrrDuhj9rnuBTt0yZN26FUS/NdzSHzwDpzaMAvWukmstfsnKdj3cUHzUO8ttYmIJDIkghoGJDd9kNdKPpERljzfjpNgxRj+rUCkCBjsPTBII2ZER5cht6pfjXs1WID0u/+5O21pOe0mi5BMHeXc/H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UxinNVb7uW/G8Ux4o4A6F1mH5WtV5T1IwzyyQqjSTYUeOVoTWPCD3iDInqK5Xo6dwF9jLkgQRoELZ5LjmjVgoogISzcNc0l9q5D5v7OBZU05i5Vaa1f6E+Pu1dBl+fs9FJUToZU07ucDd7dIHuoqQG7e0J/WIZicZyZiu63r8wFm/2SFPDkJqEH4UrJjpbU X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: L1lRm4q+dchYpuNu8mdXPBXLC80NXWG7815G7YCTTkWI29orWYGRdDYA8kVwmf91pszIdvi76WXj5vAYA72dN45fO4Jt81QU0y8sTTHmaqh7PqSaLDOthiV+aZXGJqZvKZiGDwVfx3MQTra+iJr96k387OrrpnOWDXFVS1sK2YjcQsZuc0RaM+QdapulP0/LlrysZp7OXvIXt9+UVCJeY10HpbAUtyLKFtEHzrc7hobxNZPA+Ifj7L+Tpb8d67GbsL9wfSEX+aNOoZCqreFz6Y2uEwsSjXFOIO7YHcufMxVtiW64kFhRyP1oeVtLPYzXmyuFara5hAuoXasFpmZRU6myaogR8pcFC4ETFFKr08PJOBTjJ92lYRnryGif0tphcDemfCPiM5bdL9tOj5PGvWYEUw2P/YsD72hn2c5d44kb5NwIRTp9r8gwN6xknRKbtURDH/yje2QohGMB6pBNzOvZgD3BVhY0QPdLKWBB5OKi2z180mfbLYXJ9lvWOZ919A3R7Nicvlb3PHqp2yPSIvVUkWTVJorcyyVt45P1LkTHRzeym9JKDK6B+ZG5dghj4idziSH1+FnFB0V6oK3F5YqBFLZnRyf+Ll4WCwP4gGU= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 34a7397d-93eb-40c6-8f0c-08dc4824e158 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:21.7948 (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: SUIADkJgTJIs5uF1DyN7efyMZC3GpBP2vdbJkw+94lXrhKPBokHZgQxU+q84QM1RfS3AsGLdEmVwc23UcMfIDg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR10MB7117 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 bulkscore=0 mlxlogscore=999 phishscore=0 malwarescore=0 mlxscore=0 spamscore=0 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2403140000 definitions=main-2403190113 X-Proofpoint-GUID: 1VpHwxK-dGuQZuxDa9ucctpmaOCWQO93 X-Proofpoint-ORIG-GUID: 1VpHwxK-dGuQZuxDa9ucctpmaOCWQO93 Simple renaming of the local variable err to ret. Signed-off-by: Anand Jain --- fs/btrfs/transaction.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 5b6536c1f6d1..feffff91c6fe 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -1053,7 +1053,7 @@ static int __btrfs_end_transaction(struct btrfs_trans_handle *trans, { struct btrfs_fs_info *info = trans->fs_info; struct btrfs_transaction *cur_trans = trans->transaction; - int err = 0; + int ret = 0; if (refcount_read(&trans->use_count) > 1) { refcount_dec(&trans->use_count); @@ -1092,13 +1092,13 @@ static int __btrfs_end_transaction(struct btrfs_trans_handle *trans, if (TRANS_ABORTED(trans) || BTRFS_FS_ERROR(info)) { wake_up_process(info->transaction_kthread); if (TRANS_ABORTED(trans)) - err = trans->aborted; + ret = trans->aborted; else - err = -EROFS; + ret = -EROFS; } kmem_cache_free(btrfs_trans_handle_cachep, trans); - return err; + return ret; } int btrfs_end_transaction(struct btrfs_trans_handle *trans) From patchwork Tue Mar 19 14:55:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13596743 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 A53C754FA0 for ; Tue, 19 Mar 2024 14:57:32 +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=1710860254; cv=fail; b=TO410gfIK9k11bu1TODnF8dFB6iZLewMIDOcHB7hCKyllb6WxPSU4Z9s7a1Jz/X2AQA+cE4H6Xnzc53xEyjLbgfyZdV72mCxqoxcjWNeB/dZzPPRbpeNbDmxB2w8SqG9iB1zJr/IHzJeIUAwGJdPzUrQYyp4JlNIAIHaYuaUOe0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860254; c=relaxed/simple; bh=nv5EHOBBlWol9Zbf39GbtkGiCcAuDPSgJui49+QS5uU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=hAiwkHE6wKUp62MUF/HY2hhda+WREYp9UTnzbD9quglcmF+lNiq6T0Bwz2lSEVnCyqB61aYFyySXfCYM5ho5NZtmGaE8MB9/k3dXr3gs5cgRaUySlwkkDprqwUTr5xLZS2cNJ1V1OSsV7J3BsOZH3FXxeGAbsee2jzZftbw+uso= 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=fqe8JDPq; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=zk6Q3ndA; 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="fqe8JDPq"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="zk6Q3ndA" Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 42JAHZ1i010486 for ; Tue, 19 Mar 2024 14:57:32 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=O595ekJVXdpwn0g0N2IDVWi+6EcfmfdpZetsW2NZ7eQ=; b=fqe8JDPqBr9bZDVL6JoipBowHkDUMypt/G7APIzsFbmd/fTd5U/WzEeRO6Uj3yPXPMAZ wZTiJ/0gsRL1G3skd7fci1yeb8DjRynRKvdHyG9D+PjWQrDMaWY8yu/yiT3laP008Xc2 0Iq9Bsf3sjvKkQTYjBos4TkUzI9zjPtm+6MGyquRAZkkNxAOHNEJNHMhL7cvNkAuJvtR ThBfDr57Jfo10jSJPbx8TvaZU52fBGMNInOlH52J5pUYJlLfwi+KRlkYbACFXhFuV/OB tBI+xhhOQa/Cef10O8BuM7pKTqtZZPsEb/zT6wBrSPUhxitfamLKAkOCUWFJmqRHTWtj kA== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ww2115rcb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:57:31 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 42JDealO028740 for ; Tue, 19 Mar 2024 14:57:30 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2169.outbound.protection.outlook.com [104.47.59.169]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ww1v6c1h7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:57:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Omn7FS/3sXBV6oPluROhYrGDG1xuYxUJBxX5oaKvBDObLYaFc+OfNsmgS1q712a9dvI45EOjmekbqnuJoxxB9xEvJNzwJ5QRRlmW2e+82P4wsenA44eIn3KJfYIJM9NVJvMrO+1dpVcC16bFogOcdIl2ILvwPEx/FYsaXzZ/Pzg5GWmnCy0HX/uZ3+L0Lz9KhBBVy+prrMV2+6jIR/Q5362Vy5mB/FzLAvSTfIy3DtcgyHFGDawJvHMzMo6XzhbOWBDAd0kTrPNGImrX+CC9E4oVIUaBxcfTTc5zI8iqaBBQh5x3OPBFlnDRxEd9F40SucGXleG2qdz7NatZCm/q7w== 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=O595ekJVXdpwn0g0N2IDVWi+6EcfmfdpZetsW2NZ7eQ=; b=hg2H/2fZoyLLSryvIjw1mWbWCIkBSSLB5tlDqUX19ZIAkFXGpsPyP5Gy/6C96VIY2S4mHYd73XHJtA3Sc+zA56RzpIirjmQMqTlxZTNXKm759leZ+Hcr4dEZ2U7IeLawKlLAncW1Q5m/9WrM06Fwtm3Ji9lV9VBmO95sX7tIVPmME7jQfvjqvaIuA4E+CTirUpG2fbL3JWJaMh1TQnQR2LCDAgrybKpzvhdwdMge23b/WnlUU72aCNUd/4JlWkSDRxI6rHAkFIYlW7U+6Lh3OfoBRHXXIs79sby6ibsrRuH5poxGJIWz/BQtnmpS5eXwpy/y6EKx18ADIp7qLXcEVw== 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=O595ekJVXdpwn0g0N2IDVWi+6EcfmfdpZetsW2NZ7eQ=; b=zk6Q3ndAG0b4PdEhXXm2/erB3bL5fPietBXD7onlFNNBgv7X00rPRmIC26mAN1z1y3j+WEZqLc+o3Cf9sHUlWvHkgXN1YD7cyKjwageOkRnIjT0PYV9fB0Ja3ujIG5XuXljyo/WrTq89EF7DdwOAOfyOcGuUSTOMxvTVWgxJp8k= Received: from PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) by CH3PR10MB7117.namprd10.prod.outlook.com (2603:10b6:610:126::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.30; Tue, 19 Mar 2024 14:57:28 +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:28 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 12/29] btrfs: btrfs_write_marked_extents rename werr to ret err to ret2 Date: Tue, 19 Mar 2024 20:25:20 +0530 Message-ID: <14bd267ea479d4c4d104966d4dae2d88ff403a99.1710857863.git.anand.jain@oracle.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: References: X-ClientProxiedBy: MAXP287CA0007.INDP287.PROD.OUTLOOK.COM (2603:1096:a00:49::20) 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_|CH3PR10MB7117:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Mc6WsMzMEyIkSaoulcydXC32gPucOAGlY9wAY+Qg4c+Ws5dZ3WzQEkxtUiWNyqUqiWAppTSkThgCUYMy4G7b7FvJtr3KuSLh02rKt1DpUg2XoUWAxjB+veenzJXRN8mmuK25s2Js6vZMTOjVQnEWMnog0OXFGJ43Uciw9Ej7TLPtb6rjU8qhJodYzI7xvfOgPThaJ7ckXTtvnXMyVqhs8FbambUGPJAPoc9uJJQj5J2gpvBZyFz3PfrhxPvaiZGLTLHVOsLTRO9W79/kEf6CtoOtr63HFrmDKYcpvreZbPF8NTuCp1AxbnnX58ZDFN0V5KFHffCeyD4ffPLvPP6RjTFWyaYVIzj0UI59DNeFi769eqlorX7MEqWb/xqE8jHUfIoJiiOdy+n61iZ6Zh+0rdCnkcwaHFyB5RtnDpDdxVq8iG/VHLw3vkyG08DsLx/V8slWGGi8L6YKR9IfvRqc5NXbKPG9VkkIovmTu6uKzckycfEj0hrMGBKtBbmoAN0pHsyWW0G49wsWHxyMgSQZQboFt2jNPG/WM3wN9yY7APn0sXSx/iYeKxqU1N0An3/q0mFaRMhB5hEkPGZNN+/zARZbzWUl5oNNLU0M/ADcAgppJj/NN/i4A/9PScImKSoUapyh3BR71uKcktTVggH0CVkbpHlUGvVBa7Zecmglle0= 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)(1800799015)(376005)(366007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Jx4qQkNAQ085Hg1kwRKQC/M6crkAszble1fXTX+jRIT02X7ztGwrpNJTzji3ahbOJnJWEFvt+ntlx9UhOXqtdyx3EAm7bGnGr8qZu5FzLVputdWJ1zbJQnPTGndbeaitsiHvCkiGohBkj1L971FdlS8x0m0Up+PclrtM+VOY7+lq+DU7cAC9lt0eOAi7rkoQLv8VK7MY7P6KnFK5iNwCf1mtIqDKS+xFMj7xRh8tW9JsB0boY3c1qk9O7BIUsgf03QX9W5bAKKldx+sOeh52hxdTGhe5RxVv9IFDp9TyPWDFiN8ZSOmURQJhfRAGY4KNkbeHSqhTcKcFdQWvBWTrlJDd/uhZHlQTgKM8C8QVv0BtK6rVOQfUQcrUGQjpx+98mnamkF4obXiqLyMgxqnZ+b8vEt/pG5vbQGYyVWbj9RkDrfsMjwDQ2p5UHSy4taSGnFMbuxTNtEzLL1FBoJFhWUAlAAtkW1aETcdXoKsSeZwp47R+fo62UYolBoK6K2dEr3zpRhuvGpa5Va8/DFSMq/I4IXZtAIZSnWWbJNCbbknKXWC6ibLGvWkZGVwBCcrKfkVebnc4ebYM/SZG26jYcZGsNlMbMqcRlxQMEEaRWCorRKp/zIKnN9LhA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change-AntiSpam-ExternalHop-MessageData-0: 2Oidyx4zNxivesWX97JgqouIaUwVK/g1GVjhzGMR0YpVtmBLmBkRnPemZPuy7lIlbq34tgnhKGlj2k29YsbMD+dFLergZdxy+r8HARM17aYxXiISnob/hWpUTIVaUkLVh+ODnLlolF/9lvRquX0aOUpvABLYWmH52UawCOADI1LoEP6tZ9pdYe+Dlr/1EzjWr+J0zA5LtacrDMp5FP6qsMzCDcRRc2dYvGMlJ+xus8dYjknf5+AnA+fF5fJ8PJB0xgsXiZ9vt7ZxU8nDgNwLh5OoOgeBMYdqXNNte+lZHpE6/ZNFRJXw6cu4etupXDzhKQxS8sCGG9d/SnBSRcG+Fp1qTkfjn3dDLmR12KuBHUIpTy71qXD6aXxziZ91mrqM6GzxGepp93Je2nGO/8udBgxde9UhBlUixt8wn3wlfRi63seUms/tc/RYSNRN6EEOC3fDuoefqRsWPTKiA80gF6EEJC4Uyjb2DykKvInmzdgmO4MeJ3hpoyHDDkuX1hPn2hNeOgEl8zke7y2/saUCV4+nRk0LUwRSsEOGIR6KDk6QWANbnhqeYbbERnT0Dm6YeewGQ0yCpxjpidHkN4KK7kNX0ERyxu0RLxngoZUgfbw= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: c48d15b7-efad-469d-6263-08dc4824e55e 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:28.7254 (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: 5om0aENmDl/AuAQEy9VP9HMEF8Imjw8W13Ra69nehKQkfKEGI6YF0WO59mG5E7MKCzmgOuHz5lu9rMydzfw1xA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR10MB7117 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 adultscore=0 suspectscore=0 malwarescore=0 spamscore=0 mlxscore=0 phishscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2403140000 definitions=main-2403190113 X-Proofpoint-GUID: RhZfXdZCPQ7l2BZOukM437F4GuipGwlC X-Proofpoint-ORIG-GUID: RhZfXdZCPQ7l2BZOukM437F4GuipGwlC Rename the function's local variable werr to ret and err to ret2, then move ret2 to the local variable of the while loop. Drop the initialization there since it's immediately assigned below. Signed-off-by: Anand Jain Reviewed-by: Josef Bacik --- fs/btrfs/transaction.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index feffff91c6fe..167893457b58 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -1119,8 +1119,7 @@ int btrfs_end_transaction_throttle(struct btrfs_trans_handle *trans) int btrfs_write_marked_extents(struct btrfs_fs_info *fs_info, struct extent_io_tree *dirty_pages, int mark) { - int err = 0; - int werr = 0; + int ret = 0; struct address_space *mapping = fs_info->btree_inode->i_mapping; struct extent_state *cached_state = NULL; u64 start = 0; @@ -1128,9 +1127,10 @@ int btrfs_write_marked_extents(struct btrfs_fs_info *fs_info, while (find_first_extent_bit(dirty_pages, start, &start, &end, mark, &cached_state)) { + int ret2; bool wait_writeback = false; - err = convert_extent_bit(dirty_pages, start, end, + ret2 = convert_extent_bit(dirty_pages, start, end, EXTENT_NEED_WAIT, mark, &cached_state); /* @@ -1146,22 +1146,22 @@ int btrfs_write_marked_extents(struct btrfs_fs_info *fs_info, * We cleanup any entries left in the io tree when committing * the transaction (through extent_io_tree_release()). */ - if (err == -ENOMEM) { - err = 0; + if (ret2 == -ENOMEM) { + ret2 = 0; wait_writeback = true; } - if (!err) - err = filemap_fdatawrite_range(mapping, start, end); - if (err) - werr = err; + if (!ret2) + ret2 = filemap_fdatawrite_range(mapping, start, end); + if (ret2) + ret = ret2; else if (wait_writeback) - werr = filemap_fdatawait_range(mapping, start, end); + ret = filemap_fdatawait_range(mapping, start, end); free_extent_state(cached_state); cached_state = NULL; cond_resched(); start = end + 1; } - return werr; + return ret; } /* From patchwork Tue Mar 19 14:55:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13596744 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 31D2D54FA0 for ; Tue, 19 Mar 2024 14:57:41 +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=1710860262; cv=fail; b=q3GvVB4PZQFRTLRgOYkTGKPaP58tKsI5fnKwjnHYjegm8ztkZKiyGDqmya/80w+mO1h46UGxMmqEpZaJO6U/bGxpnkN+ygAexZpa6hoRryl3y4tXSMA16XwgxditkAjLfOFiQNvs2FlpM0Q1Qf2dMiJkdKoKYGtpQ4zTUZX3N6o= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860262; c=relaxed/simple; bh=BYGWqmbUulyTpR/w40aHE/zGKVCB3vlE8NyUmQipN/I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=DIU/OAB7pDkggW32naylvf51BniY+kDGuDMQE04jxeBkmglJ1wAe/77lu98FjpsmidzlkW9gqN//y7rS9Qb6x3QQk44X6exNPVX4SvduHOozM6L3TZXAEALHHhbF05pUlbHob2fLg47lEkaGASNtVBq4PMFHwU5XI20d8VzkKBU= 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=BUCDvJxS; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=Ua6GsXWL; 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="BUCDvJxS"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="Ua6GsXWL" Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 42JAHTid010230 for ; Tue, 19 Mar 2024 14:57:40 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=gGYG3Dv1LBUBfjJCNwH++s8C2cVAw63CavHug47m6rE=; b=BUCDvJxS9BFsFvEp8/vKlI1sVlsldSMWyZicc6DSV41aKJjFT0lsAZ2rkIhtOptzd29x kMjHronQLacDeqGlSoajY5YoUYp8ZXSfbVAvBuUWCcEnvlkjQWatpVLrTqmHwjKWpfvB jLkDhZM+8Mx8zviZEJZjSRPRtuVCe29rFTfI9M1P7KlnDRCDzYfxuQlj/vJHQIwtdKcg n/MR6+sL4NoL0R2Q0AYCy3NGBjMJWCiu65AYqClgQQqkZeGu2XQFkBR6/q/uHfVCvrjH xZI2RO17uKOmukPMETvnlkuugoyLF1ZOnQ+8TD0bXaVfDT45gCjmNEPCs/iVFzFKQrPI BA== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ww3yu5kwx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:57:40 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 42JEfO6i007398 for ; Tue, 19 Mar 2024 14:57:39 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2101.outbound.protection.outlook.com [104.47.70.101]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3ww1v6cnkw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:57:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WE6NKzYEPmBWzcV9x/zVD0Mo0d2PrdOCEifR87Qa4zhpaP8vX4hJ5Ye9i+cvSFWAEyEhO31cjAZwq0GxndtqvpLWZq2Cm8ne7/ALHKyo0xpToO+aFmFP/XMV1H+W0CqP9XdKUm2noO1RyikxUmAq4rkPsWdpW/NAfWHeW0SwUTlVa8+BNV91Y8M8BLvvGKVhE7Lc/u6rd7juyrLI2C//6L1fCpCo3Q4AKmKLwEBS3OISkKt4NUGc9IHvqJ4F+a9wQEljHTjwMyD5N0cc2Qd068ZfdIjkMDZogz72MmyZxDLH/vx+Y3pxhkxGKbNxyiuBC+44iwyhOD5PFaw/urekbg== 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=gGYG3Dv1LBUBfjJCNwH++s8C2cVAw63CavHug47m6rE=; b=gZweKH1TM4B12sEwAcP8mfJQUqoJbYvjGSOum04MDEoJ5eMRTAmzSce0EMmdDTv86dWmfL/9x10mRADvwrzbePJt5nJRIrKArQmfJPjk8YIqh99Ek9O91xH0xPLzHKEUb8V+0onyzyvsY3RyxG2JfD8j+/pTqkGy0etSk7w+V1gyUtN8jafqyBN8PiF7BarJWYwF51//ul+pFGokDPMuPvXBVDdVTWMBIy0YppkTRvf94/6HpfTA8iCcy7GFlnMRKjiYtuNpP4BQ3Q9D7KpFcJNlQZJmOeiHXIt1E3ht7WFgS9aVCDZ4gU+3GMZNCsXwh5rz/5R9F1uc9ZJgxnMsvA== 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=gGYG3Dv1LBUBfjJCNwH++s8C2cVAw63CavHug47m6rE=; b=Ua6GsXWLwDq+/sP8uMcygaHvOru3nsDp/UoDp8Gw/IFLD9vaaCjxSkB8iANnq5+wiWHt1MtgTyilX5e/6EAvfdN5RHZ+DAOW5t8NxSpsx5mGRXU5YdrquwHHZM2UNrK/DkIHR8ZOj6/keBFrt21rc1jhuwLzzTAK4+7/D7mw2+A= 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:36 +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:34 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 13/29] btrfs: __btrfs_wait_marked_extents rename werr to ret err to ret2 Date: Tue, 19 Mar 2024 20:25:21 +0530 Message-ID: <2e8fef09405de09488a3dde439d213dee33e117e.1710857863.git.anand.jain@oracle.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: References: X-ClientProxiedBy: MAXP287CA0017.INDP287.PROD.OUTLOOK.COM (2603:1096:a00:49::35) 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: jGi+Mm/Vl1PO7HKwupnb/FxiyZnUF994g8ul7IxO4KHYAQM1OXMTtg6BZ8JFyYixsO4Z2DkhQ5/dE9fq6GowFtlBer/NmbhPtjfA7Xxf6AiJgN+vgrIEEzbnj49Qv54nasT/zzJhp2xNf87YiUxniE/7S63po4rk4swwKqrsV0abglCm+AOIzpADpZO/EUViVKFWHq0KONK0vogSQczdy604BYC5uHnjvW50Gtu/6e3hlHF4/LJ6x8Qijnzl1fdqvfvXp7ZPO5FT2x29lazUGW4hk+MidyhL9lWEZ81WLoNq8XNJAXVGk2d5eIjX4c1ohsMQMJGNEEudpvLLUDyw9M+Q2JFcsgOkUN+8ZgnblMe/+FD9hl3y15O7HjVG5kV0h9tHZwMO2YM/fqjvETw5+x5ElKFfZl137Pn8i3iuUd228ZyWoPjattOQsQSsSqqPe2glnUhlYbalqqGcoD92U7fjr976THY4kXTiBsQ09GFVeMcc9THR3wfYtZWla16LKRjlXZgAch+VOE9Dhe7NOmzIhVlIrGx2LGJ8wgHqINQPoUv1NHJuPMGsYE5hcRyUEnGvz1TYVW+VKKO0t7YaLYFu7GugGLVP3XqF1Y2jG/crqWTW/gPszNqW6UXt/cCcL+JDwn0ZwNgTuQ6tm7D9V6wKA3/ro2Cq5fniyzbXI2Q= 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: awlybq1UZfAB841CfjVkG5jAOSmWz3bF49AJXpzQySMyOGv+gNKxu0rn6GLQtdk2HrXFwQxAfaQoFKG0UStaxHIAYOMHasN4QQM31bryk+R7p+sITm10X5sSy4CtQUL3o6fti3xOs4k19gZ5tsZiUDk6vnx+8fz3reunbbnXXwnFR4VRq0V3VIXnMvnozh/oPNmETkSeU7zQim/euFmRjfzR5DEIkw03vcHy6EGPRwCPmrfjq9p1z1L9+egTubrzHQ5TywsBEEagjPxNGSgJXXnjnd4OIk4mF9QGfkirS0ESTdK9Wif0/H1BfJOY52YpDuS7IIwUbrxyWL+x5DCZ6/EewZwEJOdUM0OQKNwteWni1PVliNnVO1q7XMy002kU2UArRr2RRy2Ud+j/xld1d+oMVAZ7FYrXHK6glpXrFLDQNLuLoeA69+cEB62oJEr2IivBzXq2lQWU/ioZj7VrNdHvN15er7N0gNwLqpDUh8qWWEibXA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1tJBtPKNIZYRuiESr2FCDgSP3oYu5q9kVxeQqhObny+p/ymXWYpkh2xfacQrtJbubvqGHDQaZ0v X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: BxvnLfzts4X8k7aeCvOo8ZCsgUiScBE2g4Z4pe9QbkYVcP0tNi7Zxypzfcq2NEUftQpShhH8/Pb9p8VlXKUIsT60ZHr53wy1Y4XXXKCB3VhKq/0cuOqhAELsxlVFjHcvE7JQGlyGqJvbPQjk37Jidtw1IjrCgB72zCleXctMbALWgiIpJ4IUF+xHe4M4i9bTRjgxBYyRJu8KGgwNRehRcqFehD+FNY/o/yQqYUSp19dJ0sbd/K41JLt1i0eILMc20QsB+rAGFvLCG466WA/2LTfqTWHO+33SyFYvyTtEmc6fIOtN3B539VpxCLSywpFv6OXnRJhCOtIsEKzM2wF02hR5IghrjG0o6jGz4B+E78QodzjCGsrR1l4X4IbaKOhqLdtSCgGC8qq0b75TdciFb7CcPpUDNZhEPVNCD5CA4VtYN7M8UA0s1LB7/SnZYxCmt/ZPOOOm1KGRG3R+kr7/H5n2awwWerbfsFPZxkGKNGO1aRzCyMwHXOtk3FLRKD61IKTOxpeidGtzIZZJ8QVFEPGryxNl2811qzNSC0CzaC21LJmnBe6B8PZe7qylVzdoAJb5dgZktq8OxQsS7APU+3bRBRccOQurKQGUdn3S5F8= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4de416ec-be05-4cdd-0813-08dc4824e910 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:34.9047 (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: 1/olQBPxrJvhxF88wxThjZ5nE1hxRycbDZqvXQppVV2X8ZvxZyEPVosvjDLN2XLR9nnwbEQrf72J7HRKCcQ+Eg== 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 bulkscore=0 mlxlogscore=999 malwarescore=0 adultscore=0 suspectscore=0 mlxscore=0 phishscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2403140000 definitions=main-2403190113 X-Proofpoint-GUID: 57WOK7Zilye41eKS_uG9YIJ238Ji11_j X-Proofpoint-ORIG-GUID: 57WOK7Zilye41eKS_uG9YIJ238Ji11_j Rename the function's local variable werr to ret, and err to ret2. Also, align these two variable declarations with the other declarations in the function for better function space alignment. Signed-off-by: Anand Jain --- fs/btrfs/transaction.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 167893457b58..f344f97a6035 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -1173,12 +1173,12 @@ int btrfs_write_marked_extents(struct btrfs_fs_info *fs_info, static int __btrfs_wait_marked_extents(struct btrfs_fs_info *fs_info, struct extent_io_tree *dirty_pages) { - int err = 0; - int werr = 0; struct address_space *mapping = fs_info->btree_inode->i_mapping; struct extent_state *cached_state = NULL; u64 start = 0; u64 end; + int ret = 0; + int ret2 = 0; while (find_first_extent_bit(dirty_pages, start, &start, &end, EXTENT_NEED_WAIT, &cached_state)) { @@ -1190,22 +1190,22 @@ static int __btrfs_wait_marked_extents(struct btrfs_fs_info *fs_info, * concurrently - we do it only at transaction commit time when * it's safe to do it (through extent_io_tree_release()). */ - err = clear_extent_bit(dirty_pages, start, end, - EXTENT_NEED_WAIT, &cached_state); - if (err == -ENOMEM) - err = 0; - if (!err) - err = filemap_fdatawait_range(mapping, start, end); - if (err) - werr = err; + ret2 = clear_extent_bit(dirty_pages, start, end, + EXTENT_NEED_WAIT, &cached_state); + if (ret2 == -ENOMEM) + ret2 = 0; + if (!ret2) + ret2 = filemap_fdatawait_range(mapping, start, end); + if (ret2) + ret = ret2; free_extent_state(cached_state); cached_state = NULL; cond_resched(); start = end + 1; } - if (err) - werr = err; - return werr; + if (ret2) + ret = ret2; + return ret; } static int btrfs_wait_extents(struct btrfs_fs_info *fs_info, 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/X94yzYVgyCbbEfXabGg20twjjkr5Yw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x3QhvnDGF4BPZVlQN3c9Xzjah9ZA8Nkg34BE0j+AsPWeub2w8T9yldjv2CRwavBfeAPz6J8PDa4idOL7ina/Gtm1fn0IFvGQcFDfQtLHsPxsirSFjUqmlFuAis X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: z/WjqMzwtHxs8VpxLlztPRagNA7DkzlTyrVYr1jehQno21SZlzOvUs1TmGn4JJTtthSF/t2xbhzHB2fn1/Zcykn1+Vn8woeP5JluT7UZ57t9Ikq6HviMjIQS4nn4ui+7hjozaLHWFdqe5GwBA6cs/nvy/bIZ3MOHzssuviDq20q4yPgYhkRMGI8Tt6RKd9CKYpKVhcQW3SWV3dfXQMFcE0LI2bfN4x8ZFqNO1BgZMngSIyFPuO4/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) && From patchwork Tue Mar 19 14:55:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13596746 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.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 353AC54FA0 for ; Tue, 19 Mar 2024 14:57:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860271; cv=fail; b=EgB5SsSps8wWnv0TYQDvAjL3fFvr5NOsOf/p/G6VTaHT4wv8qyvNhhM/yyKgKKwtsfJLJQCE/qYT3uAD9J+oji/dTqtuMGwf2+xJxlDKK/ED5SNJI68Hj7GxBk/DPUzBewJBr/dqDLb2hum7IoGJuVvbRU55BYwDH6KlKHOCMkg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860271; c=relaxed/simple; bh=rmGvMRcdotu6U/Zko4IJf+JZVHhtzv7I8UlMf/zes9M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=AlUu92xcnwJDb4j1LOSaMGOBME6Eu/tz75zCPtVQrXNIe/5xpyUGE8fAxXXsGPX783Mhf1yVel54YLRNdutn5Zb/xdQY5HQ/HfCso3gexQeK5n2wOV4Pt8F3etO9Qb9IOVn395TaDFa/sIEwhMT+lNDW2dcPN+nKUt3OjNHY8QI= 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=Xyx72l2r; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=Wfu+Mi1y; arc=fail smtp.client-ip=205.220.177.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="Xyx72l2r"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="Wfu+Mi1y" Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 42JAHIJp005080 for ; Tue, 19 Mar 2024 14:57:49 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=al0eXqa16pqYP7ZwHXT182EMroug3UBVWwTc7dboXHI=; b=Xyx72l2rjqWSId9a0B/V7p3Epf8tmzdP0AM+G8FX0tf5gDEmKME8Mkw5qzFcc7z2STyU jQiIWhYwQpBUFdQRjcIBYcBE16CTEkXuIWUvrm+dOPPuRsxSiau+KiExa3KFztQpF/+i r8z1/VLYTgM/2oZyROlFvMTsS9lAJanmlM7bzfevcIihrFBKIOyeSxiumVAyYUwv0kMu ucG2aAotG84detZqvL5es4Oi8hVist/fqt+9+JzMx+NB9Zg6TSE5CWUebWcc6D6E2b54 YDltTcvk+uUHr8MpG1A0COieUTdf6po+69KHP7N66VfkHbcLFL2X/twWSDL0FfSPtg/l Zg== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ww31tnsjh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:57:48 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 42JEPgj4003722 for ; Tue, 19 Mar 2024 14:57:48 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2100.outbound.protection.outlook.com [104.47.70.100]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ww1v6c8rp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:57:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FH5vyGEkoTML1vk+Yb8oltRjKNX5C7VR8/eKHhZHm50vxOTrbX1nvTQ48bLUbyKe1SQGOEOvFre3ZGqWGYMF/e1wUXhW5a7haiKVtdAzXoK6WSR7kYZCZg5kEsZ8usymbfPHwLpVC6yBzG8XpQPA4zVrLdowCniXiSxmVjEXCWh6gsQ3uCsp1BzAVU2raxbK9ReXwcDmfT2NdEVg2r5VhM0Ydf//0e715Xo9dwo5+aAtFfpsuGSN0svIPZJnLUWVhEwibUE/1cMgYU63Ca+3tcEpKyz8mjdsWI2I+rN3XtWKpjNfsF0X5IOmtw6+5PwAYHbJWzqfl+V09ZdL/vVQdQ== 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=al0eXqa16pqYP7ZwHXT182EMroug3UBVWwTc7dboXHI=; b=U8WgYHHMk0ZTwd9WL4pyIVjLzsN9NMeDQBBevR36B2Dhu0jLVLBhPTnELuD+DmiTTPlrrlzrLTtR3GBQCWsbsfo6e7HUm2x75ayHXfbLXyIdImwmlW8EtQWmZ5wfK+fA2HNDftO8k/9oNPoFzFB54Ji1+449ut0UT/N49vHyDQGtPJzP6mquNCPDGbrAdnMg0vqnVCIqqP9ZzFmAQC2LiRFjyamtGTQVP4jA46fQUw7GHILiU2qW/gpna0i6k0oF9UiVLt34DYXPLnd4c/qhYx3FXm69FvdP/mz7EAnk2mLyTXcmle9e2S3dUVoqhu4MnzMAXWZwYZo4Qj+2tB56lA== 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=al0eXqa16pqYP7ZwHXT182EMroug3UBVWwTc7dboXHI=; b=Wfu+Mi1yspusi5Wv5s5eiXGxrJFJYQT0+rJZfTSB2ETp4z43kiXDS8FMzeCQ4i1ZANEb0s1Cx3FnAx/dGZ99KofSpCYUtOIXVtG4njd/IH8yi32QYWChwXUBGqMdTK5T2zQjdJNsGvNL//XtyV0i4Yot74jNg8biSlZLdndGMRw= 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:46 +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:46 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 15/29] btrfs: relocate_tree_blocks rename ret to ret2 and err to ret Date: Tue, 19 Mar 2024 20:25:23 +0530 Message-ID: <4fb96310be2a8a28757ee55042321749bc6d1e69.1710857863.git.anand.jain@oracle.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: References: X-ClientProxiedBy: MA0PR01CA0101.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a01:af::11) 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: xh7VGlgdKgqqh7/2+FmAGFY5rBP1UaU7+dBzMWRVYEub16DTv0o6d252n2Sc8+sQOCpKGJoSZpTasmj+Dd0ibwVfFuzV1iuVFqs7XLtx2Nws8jFdRcFMKc1ceYDdwnbPkspN4IE8iVyunkt8rd+SUaPBQZ/NZ7gAJEC227DU0TR5QJkpA5A7luT7FFYhB3oa7WZBe/57p+GQWvcJQWws6k+PMJz0CbqyKaNDhyXGCfx1Q7AoY9tp5QaEseSrAJcgpA0RPFhWbDNKDixQ3ZqZC9fvpmaj1vTohlS+EcYCOn3+yj+pIJGGEIAHCeJjM++Y+RPw5unSEhr2fBUGPG536NGY32bcTG1J3WFy/essSkG+ciRI11cJ+AQkTCgkYy/Mc8/qC02kup/1Advu7ZhUL5oJd04zbz8J6s8XPuSVCwg3MkJIfI5APnrL0tlR0IcyGZgrkhYCfZaVRq5Rdwlzy14+83KMEMZ/TOaKO67KGi1FF3wKQZEpLtCvKyz2w58wtiAvy9Z4G8wcttfWdWXQOq0vztItNFDgk6a1RYyXwR3Au27P/YUPclLQSUiRrO5dMh7ehi4t+a5VoR3bW2RDIQ+Pwisw2xsPcLgy5LZaC/hhSVtmaV5K8/WAP11znGytyzzyxhhh1zr7KuqupaKrdSrKrIMEmqViZXu9BpB6ljQ= 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: sn2oiblM3W2hqFxs7CFSppNuOrsuNPjVaYUwxu+WDxow3Y0+cPT5PigyKRpaRNZGYEM65s4p9EfDHJZls7BB5cF0+Oudeq9fmXxoPOx/NzMpJb65PI3SstLMFHsZlBVIG3IsTo4YN9Pnjo7wllu60vv6KraHOaGFXy4CqwB1dgq2Q/tWJaxTcfdOPu9giKcSNlkbzjDErfwe2fTV6B8Us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S-Exchange-CrossTenant-Network-Message-Id: bfcddd21-df3e-498c-f192-08dc4824f000 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:46.5750 (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: j4OOfWT2STUD8hFVGjGPtAdUt979XBD08PoqZ47SKqqrR+Oj3/XqbUJbNq1I5074ur2WnxuT7cfbKYRkvGrdiA== 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 mlxscore=0 adultscore=0 spamscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2403140000 definitions=main-2403190113 X-Proofpoint-ORIG-GUID: -nELxNcnQbQzcWm5-HAEuyGHP-aWLQUr X-Proofpoint-GUID: -nELxNcnQbQzcWm5-HAEuyGHP-aWLQUr Coding style fixes the function relocate_tree_blocks(). After the fix, ret is the return value variable, and ret2 is the function's local interim return variable. Signed-off-by: Anand Jain --- fs/btrfs/relocation.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 535d5657777b..47b564df4340 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -2776,12 +2776,12 @@ int relocate_tree_blocks(struct btrfs_trans_handle *trans, struct btrfs_path *path; struct tree_block *block; struct tree_block *next; - int ret; - int err = 0; + int ret = 0; + int ret2; path = btrfs_alloc_path(); if (!path) { - err = -ENOMEM; + ret = -ENOMEM; goto out_free_blocks; } @@ -2796,8 +2796,8 @@ int relocate_tree_blocks(struct btrfs_trans_handle *trans, /* Get first keys */ rbtree_postorder_for_each_entry_safe(block, next, blocks, rb_node) { if (!block->key_ready) { - err = get_tree_block_key(fs_info, block); - if (err) + ret = get_tree_block_key(fs_info, block); + if (ret) goto out_free_path; } } @@ -2807,25 +2807,25 @@ int relocate_tree_blocks(struct btrfs_trans_handle *trans, node = build_backref_tree(trans, rc, &block->key, block->level, block->bytenr); if (IS_ERR(node)) { - err = PTR_ERR(node); + ret = PTR_ERR(node); goto out; } - ret = relocate_tree_block(trans, rc, node, &block->key, + ret2 = relocate_tree_block(trans, rc, node, &block->key, path); - if (ret < 0) { - err = ret; + if (ret2 < 0) { + ret = ret2; break; } } out: - err = finish_pending_nodes(trans, rc, path, err); + ret = finish_pending_nodes(trans, rc, path, ret); out_free_path: btrfs_free_path(path); out_free_blocks: free_block_list(blocks); - return err; + return ret; } static noinline_for_stack int prealloc_file_extent_cluster( From patchwork Tue Mar 19 14:55:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13596747 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.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 A0A6A54FA0 for ; Tue, 19 Mar 2024 14:57:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860278; cv=fail; b=fIklQjD6sQ3kO0GX075UyC9TpDjCaPMKVlmb1BUPiBMivPF8KviVbJupC+O8Y9ZP40cFQ2trMsc6INTW8H+gtzsUQyG2zI+z39HZ+mG1OBn4QfNMlUy1Ie8tFjwN4POmdSsYr8YDEWhlmzpLaTGFRNdXgYpF5Y7arrAHmWNFYzk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860278; c=relaxed/simple; bh=StqYMg3/HefFYJWxpyuMpkF6oB24iOmaw6niagpbb+c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=aLzZPe03fsNxlu7DEMcUDYfrvCGGPC2C6pptb5Shewj+KgWHwLQLWSZ3VhkxVL03bLcEqE6aSW6D68Siv1gsZk87uDJIKiXNVeTclEMgdOLP5VXF0T+jCb7x88/Gq3eikemQ3RzWODP25PycAKvKsOLapoL6NP3Z9Z11xlBqbd8= 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=Q9YigOyL; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=DyAngMQa; arc=fail smtp.client-ip=205.220.177.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="Q9YigOyL"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="DyAngMQa" Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 42JAHkq1019658 for ; Tue, 19 Mar 2024 14:57:55 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=iT75wfBZ6Bq9GtM2PoAMdOFQg8iNtka83tSrvS8gXMI=; b=Q9YigOyLDZnmnpxJGrV5yuzg1wmMFh00n0fWXhuAKVwirzW4RA6yAIH3QXmMhw5a2C4w ObVFbmBhkxdVZCcrcsA2X9fdRHclY+bwbHaBOPrIrnQT8HBbY4T3a0RgWBPM3IPQdrhb VG03SbipO+wP1QoVwYc81UOVOi4fqbZRRQ0qxM6iHa4FmuZxqYrj7wvQwujlxZJ3OBRo Es0EOX1wf9J4VmhECocsojATgTaFMV+jMs2u/zw0X3ym9W2kqEZqwJitu5Z4ppqJuQ6Y rrFWj/jzpi2nqtwNhr3QpxGZWdm072EIadwn5tKMTZtVKe/jq6dJRWqL1IGJf29w2M1z jg== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ww3fcntkx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:57:55 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 42JDbQYS003718 for ; Tue, 19 Mar 2024 14:57:54 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2100.outbound.protection.outlook.com [104.47.70.100]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ww1v6c8uq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:57:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Rnau0Z1NHHXmL+GnyZoN48aBwdaOXL1OxLq6E4y+Vc3EQq0g13BTUr73+Mz+BwhfvbdjQOL5oTMPytG/AQEAm92OaNKi63v3X0AOWbfpCTeu65Ye7UzhKxz6doP9qsOse6qon1rYupT2z5eyAzOvoqYqlcFYeGvW3+BEnA2RXjIzso2hesmHYwEIXMHVChtm58iqy3Ow5PEwgw8cCiiXX5uHcf3H0aJ+HBXjk48H6BZKUD8PEDOmlWXTEWM64ThDODgi3X84/mocegtBiFwmSfSOsNyMHn8+EmT5q59RRfUd4atdmIAms9pKTws3m9AgTsq1E4Bja1tGfByT75EP8g== 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=iT75wfBZ6Bq9GtM2PoAMdOFQg8iNtka83tSrvS8gXMI=; b=cP6Ip5FxuHRMoSKWvv37Z1FXNkB1xQWoE8eMwI7hOxACcCW+MMhedILrHOoKUyi4gFP13kaSTtWSpFbKP/8XHXMThPVKPF/qofuhUbikm4MYU5ulSmUvXe5ltkbIhulizVRrYex8h35bDHrIQqDVLSdM/y/BDX5zM4S8lzdgYnkpOvgxCZi2eRQwMvrF3oETfcIHPu2u0HkVxRUANz4rrqPxq1yqSJLVUyGdrqYSbYYpBDUu+JRuuEVgr5reWl0whQ9Syq3xsK+6LvpR6LdPgxa2ntZnNGLlFhlKTPwbYYEtB0QdNkiP61NGgmzlZhRpffy8dboN4xbbdXAbmWMoEQ== 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=iT75wfBZ6Bq9GtM2PoAMdOFQg8iNtka83tSrvS8gXMI=; b=DyAngMQafseZ9LdVLVPlkNb3u/0bkiCJNUGZepcJAfzkaNNKELce5FkWsAakQL5ixMyxuLUy0+VCgxzzwusOA/QPzBlzdFGkjv89KOZV4V5LYyPD56C+5xjvB6hzvbnSajN11QLA71DGErF05PflyNw5gzFPATUE30+GHc5B8U4= 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:53 +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:53 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 16/29] btrfs: relocate_block_group rename ret to ret2 and err to ret Date: Tue, 19 Mar 2024 20:25:24 +0530 Message-ID: X-Mailer: git-send-email 2.42.0 In-Reply-To: References: X-ClientProxiedBy: MA0PR01CA0096.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a01:af::12) 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: qIPxP1UA/UsZxe9nJ/xxOZLCCdhVhm/wUduijyznJjlG4Ifk4nczjdAnWt5hsuNwGVt3OfJQQRbEjZoRcMlEu51yyIh7kA1I7mn/iozUHWcos4qGbGRIlu5+MGMQRkS5zJ3aySjpA1lcprJqD2YSLyNMdMufC050wGsbUMRc9lZihzvHGSZJwtE3pQ3TcRGxEYJaM9bP5h5vi9orlsVcgSOz+R7Zn48vAmHjw5iYK0HAK1y1BfWGhBHMczUr4Lbj0MvU5A61kSLOnFlU7XUTY3kRyF86uw12orPwTTElL5Sj+HN94LLiyuVyZCgtAIUqU0afUd5lcahX9Ziml1GqcuAnAotcr5M0GcdYQmJWvNS34qw8rVH1fuAEWIU79rb0eaHQLvH4VFwLepC7TGgmw55p8XK0YuPpnXoRnQ1ywgpO89/jkePU2Jp4qY6dFx9CJbDSbZTJehAgkCdWNViOEzR7Yd7ZERvkNd5kLje2hmonCKcuGgt+0i1FVonGVq4O89S1kaqMGGa5LSki7559z9wPaC4agY3mnk7ZcLIGVD7OFNdy47Um8U5snFQ9WT2gtxw1Jedc6ZF/KPe0LmD1wq65MPCpweYQ8SOGNT5Eyw/Sz2LUHFXJAu4T9L88tNP3hF2d9yr1KPTTuPP1FEuRe8W5CFo/ZngiRBJnwSko2JM= 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: yH4UkYl60/WurP+iFPfHhG9W34/aHd6MUSv+ouskPDiZEIAMfyYb/aa8N4yDjxoC2jDnJVBam22DRjvGvwE96dD3KS2VK6WXLJ74Kpp48L72SXnI1Zov3yyKwRAxwcSgGlk7O1V6Pg2Xaqosrqk0Vg5zms4oL4ZdHu0QXPW8HEWZYA7L3V3b6wff3drhbOZ7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Z8ay2b/2x5irC9zrMD5V2a3J+DrgutDW6vFHw59q4cBR4qYMxuBhQVbY2Urxy7cbOPtMsIOC6BRYJAgoTsKTye76kXkVk+JnaPhske/y1kk3cMEQahDq8jUF0hHe9UT/SLD2c4KH786NZaLgpr6jMdJITf2YIBGYd7525YiC9p3rnTi8aybyac0ZObP8Kqj2QziB904gAd42FBU2lg5p9IXBtpkI3ZsamytHYqLe4EYe2WVA+Lgp4aLjZOpPm0+zKTTGBTcxOteuzJHh6X/v1gKkYXkhAVxACfuFBIvHIHM0bj+PVKC5e++d7oG+IwW72CItZNPgKfl7DktB2lOTsnBovwTBd0BGiGq292r3UrYJxh59gb1qaThq9hLCmma0r2Qdw85ACS3 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: smfbJcxo0VU2zmw7kXcbfdx/A/Xx3JeE1HTVfMzAsKMGhBjwYzsdqf0QG9sduk+ARD6bLnVqmS6B3LvbPKDS+pwbu1fI4umRujuATJCQ+Dv3tmS3oQdPbhVNtHgLVThp/rbXdR2BrP3kP0S63fS+bnjbttLwDocNt31PHdcDreoyX+wOK9xluiixp9nx66YXyDwWdrhbv1wjbEdiLKibJU/y941yJytzgcoo584s5xUCVC1KfXIo3h120mwKt7+zGEdEVtwi68qkE2sZkJUMnQmY1mUW6U4JPLy0UirWXJBPRsnfeS9K62zoMzYAD2d+DvudVvKsmDMHDEeGJd7fqIjflSp1C4s4Yvz7FFJRVTSMMllB2n4YEXh8CuhhqAjZjHgGTgnWHWT9eXeTtn/SRjE6ruWQbPzRMTVbkuaLcevgaF2x6pW/AL73WPqSpwfwaa/UvUZB3cpiIWrwqr6Duh/uDv8SsJSKAsJsPLrDSuHqEHn5HppzDPdI4ykm8pRfrbPo5TQ6WnmRXEIueWdBmzn4QKGXfv7fhW5RMK040HDdkzYMGrn/D3APLnrcoYFjUDCrLADftA3QcD2UbisVnHKmCP5g51Flgle+3Mfzs10= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: db65da35-f164-477a-7c78-08dc4824f3ce 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:52.9539 (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: GwVUNMLsUFicrJSNvM+TEq6TPhPSmI1E2Z5EhfkZjnnSr8IJ7pWzIRiIF+hEJ/zVezRvkaH09FX/dbEC5jOCpw== 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 mlxscore=0 adultscore=0 spamscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2403140000 definitions=main-2403190113 X-Proofpoint-GUID: FwWlmN--g0tRhz6MkwDwIt6AE5i-_NHO X-Proofpoint-ORIG-GUID: FwWlmN--g0tRhz6MkwDwIt6AE5i-_NHO Variable %err carries the function return value; rename it to ret and the original ret is renamed to ret2. Signed-off-by: Anand Jain --- fs/btrfs/relocation.c | 86 +++++++++++++++++++++---------------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 47b564df4340..412d328bfbfd 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -3683,8 +3683,8 @@ static noinline_for_stack int relocate_block_group(struct reloc_control *rc) struct btrfs_path *path; struct btrfs_extent_item *ei; u64 flags; - int ret; - int err = 0; + int ret2; + int ret = 0; int progress = 0; path = btrfs_alloc_path(); @@ -3692,25 +3692,25 @@ static noinline_for_stack int relocate_block_group(struct reloc_control *rc) return -ENOMEM; path->reada = READA_FORWARD; - ret = prepare_to_relocate(rc); - if (ret) { - err = ret; + ret2 = prepare_to_relocate(rc); + if (ret2) { + ret = ret2; goto out_free; } while (1) { rc->reserved_bytes = 0; - ret = btrfs_block_rsv_refill(fs_info, rc->block_rsv, + ret2 = btrfs_block_rsv_refill(fs_info, rc->block_rsv, rc->block_rsv->size, BTRFS_RESERVE_FLUSH_ALL); - if (ret) { - err = ret; + if (ret2) { + ret = ret2; break; } progress++; trans = btrfs_start_transaction(rc->extent_root, 0); if (IS_ERR(trans)) { - err = PTR_ERR(trans); + ret = PTR_ERR(trans); trans = NULL; break; } @@ -3721,10 +3721,10 @@ static noinline_for_stack int relocate_block_group(struct reloc_control *rc) continue; } - ret = find_next_extent(rc, path, &key); - if (ret < 0) - err = ret; - if (ret != 0) + ret2 = find_next_extent(rc, path, &key); + if (ret2 < 0) + ret = ret2; + if (ret2 != 0) break; rc->extents_found++; @@ -3749,24 +3749,24 @@ static noinline_for_stack int relocate_block_group(struct reloc_control *rc) } if (flags & BTRFS_EXTENT_FLAG_TREE_BLOCK) { - ret = add_tree_block(rc, &key, path, &blocks); + ret2 = add_tree_block(rc, &key, path, &blocks); } else if (rc->stage == UPDATE_DATA_PTRS && (flags & BTRFS_EXTENT_FLAG_DATA)) { - ret = add_data_references(rc, &key, path, &blocks); + ret2 = add_data_references(rc, &key, path, &blocks); } else { btrfs_release_path(path); - ret = 0; + ret2 = 0; } - if (ret < 0) { - err = ret; + if (ret2 < 0) { + ret = ret2; break; } if (!RB_EMPTY_ROOT(&blocks)) { - ret = relocate_tree_blocks(trans, rc, &blocks); - if (ret < 0) { - if (ret != -EAGAIN) { - err = ret; + ret2 = relocate_tree_blocks(trans, rc, &blocks); + if (ret2 < 0) { + if (ret2 != -EAGAIN) { + ret = ret2; break; } rc->extents_found--; @@ -3781,22 +3781,22 @@ static noinline_for_stack int relocate_block_group(struct reloc_control *rc) if (rc->stage == MOVE_DATA_EXTENTS && (flags & BTRFS_EXTENT_FLAG_DATA)) { rc->found_file_extent = true; - ret = relocate_data_extent(rc->data_inode, + ret2 = relocate_data_extent(rc->data_inode, &key, &rc->cluster); - if (ret < 0) { - err = ret; + if (ret2 < 0) { + ret = ret2; break; } } if (btrfs_should_cancel_balance(fs_info)) { - err = -ECANCELED; + ret = -ECANCELED; break; } } - if (trans && progress && err == -ENOSPC) { - ret = btrfs_force_chunk_alloc(trans, rc->block_group->flags); - if (ret == 1) { - err = 0; + if (trans && progress && ret == -ENOSPC) { + ret2 = btrfs_force_chunk_alloc(trans, rc->block_group->flags); + if (ret2 == 1) { + ret = 0; progress = 0; goto restart; } @@ -3810,11 +3810,11 @@ static noinline_for_stack int relocate_block_group(struct reloc_control *rc) btrfs_btree_balance_dirty(fs_info); } - if (!err) { - ret = relocate_file_extent_cluster(rc->data_inode, + if (!ret) { + ret2 = relocate_file_extent_cluster(rc->data_inode, &rc->cluster); - if (ret < 0) - err = ret; + if (ret2 < 0) + ret = ret2; } rc->create_reloc_tree = false; @@ -3831,7 +3831,7 @@ static noinline_for_stack int relocate_block_group(struct reloc_control *rc) * mark all reloc trees orphan, then queue them for cleanup in * merge_reloc_roots() */ - err = prepare_to_merge(rc, err); + ret = prepare_to_merge(rc, ret); merge_reloc_roots(rc); @@ -3842,19 +3842,19 @@ static noinline_for_stack int relocate_block_group(struct reloc_control *rc) /* get rid of pinned extents */ trans = btrfs_join_transaction(rc->extent_root); if (IS_ERR(trans)) { - err = PTR_ERR(trans); + ret = PTR_ERR(trans); goto out_free; } - ret = btrfs_commit_transaction(trans); - if (ret && !err) - err = ret; + ret2 = btrfs_commit_transaction(trans); + if (ret2 && !ret) + ret = ret2; out_free: - ret = clean_dirty_subvols(rc); - if (ret < 0 && !err) - err = ret; + ret2 = clean_dirty_subvols(rc); + if (ret2 < 0 && !ret) + ret = ret2; btrfs_free_block_rsv(fs_info, rc->block_rsv); btrfs_free_path(path); - return err; + return ret; } static int __insert_orphan_inode(struct btrfs_trans_handle *trans, From patchwork Tue Mar 19 14:55:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13596749 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.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 616365F84F for ; Tue, 19 Mar 2024 14:58:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860307; cv=fail; b=FtUNQj6K5iuvykOf94MUKgsBC8FhBN3pQ02jB3MRX6YvkavrzCVjBx2uYN/B49aKYzikbhTUvLCw+b3HIQ8lxflQVqUP/CqlJXswYYy79fjBcf8O8i7z6lBfarPlST+mr3DuyStCi3iA49Yw/IHPEptHhksXVnQmcAOnNVx8OWU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860307; c=relaxed/simple; bh=qyg1fjhZlPODkzYFF78otLmfQVvp1o5s+av5ZFRYRI8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=uUcfa4Kb+I5upTau4nt+Z+YXPPoHTKaQb/yW7gxrAAztcrvMrwjW2z/DyBfz6Z9UEdN+jRskb2iyzIYV7+8v2egJHWZhRzuK8arg+aq1oeLzUXBICyJaM6tsO/NydjU9s6Kep9Mg0ruSBJtLv+OrwRf+dP/jjUgmmUMkQYvQLKo= 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=nkY55DN9; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=Fs1omo+4; arc=fail smtp.client-ip=205.220.177.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="nkY55DN9"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="Fs1omo+4" Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 42JAHZV1026423 for ; Tue, 19 Mar 2024 14:58:24 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=L3bf5a+JA2hK2hVxtFMVHjp8r3WqGHQUrMKdB8/5UxI=; b=nkY55DN9lJ6gb4Ej/qNHhkCuiPe9ou74MnM64IOblQIwIX0bFphjp+8U00LNa/zF/TIf +DvWJ+/i0w7j2NCZjvwggLRerzLQaEd9XrShzI4anJ1NKT5Y0gk4co7XWxOI2CQtWNUd yU7BU5p491UIzJ8fQYCo932sRPvd6mbWCoqj0zNjfRMKRlkP3vq0r+IEzPBt5WPxvIlh 7Y6N5qSFnsl3v9pKQy5Qqvpk3SjFeaRxK7AOVJPZP2/usFcGx5OhgFYpu08Sy7b136NT jKpES4wsjRdE//7k3f4AXq+qiojA5RGa2mRtmMtrlygjvTzB/9qYJhx2GuK4n1hl0Y1w Nw== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ww272wtvv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:58:24 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 42JDoDHR007468 for ; Tue, 19 Mar 2024 14:58:23 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2101.outbound.protection.outlook.com [104.47.70.101]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3ww1v6cp0x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:58:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IthF4gO93vhm0s9yAj7d76teJc+io6KfSaDuwNa9/db0U2xtOXcLYDDaMjZsYW9hVkfdckAl5D8yg/UR5Te6JphZyJc6ER/9+fkDQIBHSH2d/VBCfYEwYGXCaodFaUWy7mDcY1sIn20C0Vm2uF5xPlI3fHN3l1vI7f8Hn7Q8cI3cDJYrvBjNe71oK9GFXbaVJGEYVv7RDnhJasTpP9FXjEg+NOX9ITWgRvqTsLvMGlYwGRKC8LcOKB+PDp/7LUPWvz5fk4E3Y6bsmUWp3GRSepIwWXiPH5ccM+gr+Jx+Jy3/xG1FaoTsjanM4kzRCG3HP0dTJDMzEwlhx9lpcDhZqQ== 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=L3bf5a+JA2hK2hVxtFMVHjp8r3WqGHQUrMKdB8/5UxI=; b=lOlT0rvPWz51zlOoXppSZNi8Ucd7OkT1o/JjiTwubfCiAW77OEXLwJsXOu573D7fCrNZCOAjTzUr7O3xxkif83otxguoDjPvh96HhOxwGyDuJImT7URtGvPioZpEV85Q/VpL07nZr+IKi5olPo5yY8XMhrGEsWAwAtobEZaVmEvpGtXscnyFeJz+OVRteqVEV5b/23WEl/0UOoHQzLdchKKRyoh2TiJvm8i9K7q44K2rwphzcKEVnxXBKjJlWEagvvMf4reXq109yDkYW9SxAlGNjldOvy3x+vytHV1AleS5M/hUpKRvPSILLPNEq8GIcs6O2TuJR57JkxUu/mO+Dw== 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=L3bf5a+JA2hK2hVxtFMVHjp8r3WqGHQUrMKdB8/5UxI=; b=Fs1omo+4rUCv/h213p5d9IxOKMJzzWddgUskNbwdGbrbxqbWF0IXuPg7G32rugKRE7Yd/TY6999abNvxbBVWh8vbdRkUtyKWY3/zIY/yb1D7oR3DIVhYeSQ78pGdL0sZKMJbRil3E4PKuVhY1bQsyE8/rwVTYQmP0smo6oK5jjE= 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:59 +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:59 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 17/29] btrfs: create_reloc_inode rename err to ret Date: Tue, 19 Mar 2024 20:25:25 +0530 Message-ID: X-Mailer: git-send-email 2.42.0 In-Reply-To: References: X-ClientProxiedBy: MA0PR01CA0090.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a01:ae::19) 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: Mr9kDza589Kz6cSTC22nYdLEhiw7KoUP2chi9Smt7TlqNZk2Gh+zrVU361MYYnfTynL1WV3PhaHjhEBbW05tJe8FmLPvNawDvUxBgzfjZyg5g9gJc1IdQgxFZQzvygggBYWIKEpFjZT9KxdJITQiHBN4o6yADP91Hp9M/sUfl+Ajvvk+zQ7Mh1GWcSdYwaP7FJVcAt7D6FD/AfCkUlrjNOEeJoArpQS0rxStHuJtJzdMKk9RfyXyR8VlCnXtzbFOFRuKWS+EO6xxJVidbTxIytrF1DgP+LYd2JatO5odQ7w+jBgCfI1PJI5Xniocy9jCNnqCbs26ZG+fHenIc0pd2WZ2wgFd1ytZ3I37vcF87GtNkpDNjGCTGQHqToNkI/ktjo1jgVPdu3eofOUt6B3zCBizYsA5jQWQYjh8YmPmTNiiioS4XdLy8i7MqDkB7Vghbu0yQJ4G+RNWkbVLG2aRUJp6GSrVfGx//urbO/EXVVUCw/DufdDN3Ztl3yS6FymLcIdPDrimII7cyKwf4vdQf7WVilJMSTLDqDhW1nObVJDPEG3vT5iTwD0jBrWFhaJRllgvS3N8lsg0Fxh72K+XthGe9EOGg/rtKmwXAgvXWBu24gxmLYiiQT4evZ2yLKPfyoxpbHGPnci5ha1SsbjGiO3iB/9Bz4umEkRTK0hNIYE= 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: RjAMMDLoj/eMiqWCYRtZbUUY5n+g76N/kE5+oPqEreDoKJCdfbg0bT3AMHwIZKuddoLiaaJfnzMYXunfrpzci+Swg47JcslOa9EMYBPaIMUVv504h7XGEKrg9HoyHNDbS9n1WZ6UPPtAesO0foa7hc1zmbZ8AFUoPS1MRBc/DOuPtehD6+3nfIWqbbjVLpwmH/m1R17LA+feZNTPFGepo5kcme5Js2kjXmFc5heEzMbxlfzpYFiiP+EsMNSIHhoiMCtoC5AHHAFZ+2CXr9ypxAFLJRptMC2vYYtd4+nx1M1BsmN3jFkCDdiaxVG5TL3Ikn2mnnSPZfNii/xCJeg+NA33CjzmC9bgJFXHkX0Lnud/ZEefDbqWxU2CzRo6CAYoGfI7vnZzq7elsAk1ZOpHeclQE8kcYBXGafwYd6eKEdlv+svMUm8r5sAe5RdjQd9an6NLReCR4RNwHT7wJfxg9IPRk3jrsbqSjDjCOd90Tn+X0I1IOBzA0cj1Fyi2lpiujejdZCPNqUwn+msCoQ5Udh4Qhdli/Qq2TWbMR6qqhwz/n2/5qjv5vx8CDl6mTVumewkWceQtA019b4slFe6YIDPhGZursg1s1uxuvz37S/iAkdyAAUWydCsBXQnCnfYStu5QrQc6oAuXRYnB0CASdgd+gxvyACQg2pKn0SgY4LyX4I6ttA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01jngrAE1yIsEEOiOd/n6B5SH6tiBjr3MbDDKP7NvvZKBNulNmtgGIdXflPkPuXKP5g6ltr1Q4W9lgwtrh6b3Gk1i8xEGpKoAeTr1WR4OvSCWmCX3WymwWnKQ0xqS1fzCl2ieO3n/KnCyorUFaBT+BjpxAGGKgptzt9RDihbwJDa7tf/RR6D2BX3KlIPWvY/zk3FmEwqqbSOGCaLRlrFmLs2VKyy8lROK+p+f0nQoDrCg4VZeVy9cqqBjmZoVGOfR1hJGJ8cOpEsMG8bNxwrrDjCdvFEiNuiMl/J3bpJ0W6HrQullyq782F0c9WT3+Nm34wP4cjT0y5mBoAHURwjuBOm2r23kbdq0VnkHsnoD5kzBL+bWga+33DNwDGdwFSi5i8JB9vdKbg/dDWMZ5hGaNlvGo+GBP/3VBUspTIXjnRED47zr2mHt2fXZGAi/lTM+iMZ/kM7RluLmmxcXgnFMhzO9S89BOeMdlekPHaw7p4hByWFHfKZGI7udm6nh1cN0xn/Y5E0iKRLrZVAu6/iyX0KM7eOBi1Cq1ZGuEjbef/Da1sMQoKPf7KMrq7yYcp+PeS3Nqbv+1IJE= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: da448f04-19cc-404e-6eb5-08dc4824f785 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:59.1778 (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: fJ3D+J+0F6RUsC4Ed1HMEvmoZgiIOTBY39byN6Ad59e1nBv5uuar6+NLqnefBB+o++5d/NhlpRkt+EVHi/0viA== 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 bulkscore=0 mlxlogscore=999 malwarescore=0 adultscore=0 suspectscore=0 mlxscore=0 phishscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2403140000 definitions=main-2403190114 X-Proofpoint-GUID: WEt1Zf6spa4BxThOzdg6tq87wD4cbT-t X-Proofpoint-ORIG-GUID: WEt1Zf6spa4BxThOzdg6tq87wD4cbT-t Coding style fixes: Rename the variable err to ret, as it represents the return value. Signed-off-by: Anand Jain --- fs/btrfs/relocation.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 412d328bfbfd..16a3882a4a7c 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -3928,7 +3928,7 @@ static noinline_for_stack struct inode *create_reloc_inode( struct btrfs_trans_handle *trans; struct btrfs_root *root; u64 objectid; - int err = 0; + int ret = 0; root = btrfs_grab_root(fs_info->data_reloc_root); trans = btrfs_start_transaction(root, 6); @@ -3937,31 +3937,31 @@ static noinline_for_stack struct inode *create_reloc_inode( return ERR_CAST(trans); } - err = btrfs_get_free_objectid(root, &objectid); - if (err) + ret = btrfs_get_free_objectid(root, &objectid); + if (ret) goto out; - err = __insert_orphan_inode(trans, root, objectid); - if (err) + ret = __insert_orphan_inode(trans, root, objectid); + if (ret) goto out; inode = btrfs_iget(fs_info->sb, objectid, root); if (IS_ERR(inode)) { delete_orphan_inode(trans, root, objectid); - err = PTR_ERR(inode); + ret = PTR_ERR(inode); inode = NULL; goto out; } BTRFS_I(inode)->index_cnt = group->start; - err = btrfs_orphan_add(trans, BTRFS_I(inode)); + ret = btrfs_orphan_add(trans, BTRFS_I(inode)); out: btrfs_put_root(root); btrfs_end_transaction(trans); btrfs_btree_balance_dirty(fs_info); - if (err) { + if (ret) { iput(inode); - inode = ERR_PTR(err); + inode = ERR_PTR(ret); } return inode; } From patchwork Tue Mar 19 14:55:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13596748 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 A619F54FA0 for ; Tue, 19 Mar 2024 14:58:25 +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=1710860307; cv=fail; b=oyuJLT0hb1AbiiZqfLF6axhm+axqOLDqH+CrgjvP0VcjwVu9QLRSfI93YT/2quwZ+0nXt8y5jVcZDKHML4KDILB/GQHvfC4vuG9h2VZ9fLKN1Ysy/sF+dvbFmhMUAKYkcF9KxN61YDQeBnZhAOHL2OdSTgpB2+6P4nsPDi/7tv8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860307; c=relaxed/simple; bh=O0PfqLAiN8mhDEmlV+Cv9Axkg+ioowKe6X0l9THYhDI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=CwU5abouFmSEmVe3DJS3G0/5pX1nYJ+X2koSA2au9CccArWXTAy8vGAmKQ4fBKGEykZGqCo4Yi9aCaJvovTv4d3moeNVt8wbCsoTUv0emXDopehW+STYRZbuo8yGIinCj192LK4XF1GnL/nTn1NRW7+bLkmKIZ2uD4TgDoeag/g= 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=RT6/7Zke; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=Fib6z//j; 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="RT6/7Zke"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="Fib6z//j" Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 42JAHYnK010459 for ; Tue, 19 Mar 2024 14:58:25 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=MpfA7dJ6B/OITJfrdltoSKFlc73U3EZFn3ltFSixZd8=; b=RT6/7ZkemnB6CHttOoxiDanlfGsiEXiA6Ws8MN19u3U4gEWDeG3R96U8kGygOGCV7rHu xagEDx8yMTpFVPCcDyeUV90s6AdAPbEHVM4uPXedXLNu4DoMpRaSQlPsUs/K2EcP6npQ w9BHW1dvg8OkZOjkLLQqBf6011h8rt+xI0YG286KgdGin4veiAU4QRNp7oYIbL9ky9IL uT3vMpn6uzYr9zawSQAY6uib4dUjXZX3hIfBQAEru6LLWhEwTGRTlPfx28hZaBrWzmSe RAsjC87txQsQuR+SD4oH62erfiBSVyjySsRWIwMfdZ3ZQvrGCTm6oeo8J8AcBz/NgVgG zQ== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ww2115rds-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:58:24 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 42JDoDHS007468 for ; Tue, 19 Mar 2024 14:58:23 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2101.outbound.protection.outlook.com [104.47.70.101]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3ww1v6cp0x-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:58:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ApdWPUdD75FST2+IdI8hMUY/G8URVqj11YT3uqPH/R7jQ+O1ZKjxnNw5I+O5DZL7bHA7gHGi6ypU8pMv4ZqX8lF/QMSFz867MEq0cfTU6wvwmoVBx64UQZ+92GdXqukNVRpprf8x6dY/gnUVZiLhndbVJA8cDPLUIaA2jn4l5Fv2ZLOEqpXHpY7Tjki6jpzNfHtaBA7KCZqculu5cs8vP6+JWNG5ktlNBBzfpB5QD3McEf/Urdv5xnpHGvLShkgJu1BdhAv+0O+FKH1H3uwKjOFPMKEN/ymI4eoFwJp+Ey1abu6Rj7qTaSdPwjZMYL4usqxg+7X/bmtjHGXCeNmb1g== 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=MpfA7dJ6B/OITJfrdltoSKFlc73U3EZFn3ltFSixZd8=; b=WeWaa3toMRGRPUFUzPoGnuYpZ7DCDuQ2pHs//vMIf939l7G5Fem+/GyP45l0F3EQj4I/8P6KZhmZKa65NvZWMgCQ2KhOCtnzI4hLW221GoRVF/XIXp0SOU/l27FGKpQeStyP4INPpr2BSroSw08srfucBg29L4BMn7wO/fpAmxBskzbKssEuGtRveTL+DRuunPWfBne1+gfMyjK4B9V+UPt1GqFtBZst0UEDNjPkwgllSrDwn448CkX8He1bWywTUaO2ma0Fuu6i/yyU+8JUB24p3ugilPYQcTQByj7Y1aTZUI05l4mZGWylsNMaIcia5L+WVubC+1m81w8PM+fJxA== 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=MpfA7dJ6B/OITJfrdltoSKFlc73U3EZFn3ltFSixZd8=; b=Fib6z//jYT51Pe1kN15WfTyKv0gpnvN9ycKYlJXFCG8JxTPng+D4O9cwEsakvS6zY58kSzlIOpAc0wvKFd6j9TmFPvQUz91KDFqGDDBz4zeMLeM8CeKmsi0TCI++UyAjZFkocHY0wYdfoXICTBjAnGmLBkvG5qzx3MoqM2vpCsg= 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:58:05 +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:58:04 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 18/29] btrfs: btrfs_relocate_block_group rename ret to ret2 and err ro ret Date: Tue, 19 Mar 2024 20:25:26 +0530 Message-ID: <2af7ad0bfb1d016f4e5668d96cfc7d41c185cce7.1710857863.git.anand.jain@oracle.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: References: X-ClientProxiedBy: MA0PR01CA0093.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a01:ae::20) 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: MtA5srfyfhSnXAH34j51CltK/tc++HV/fAMN7kluueZ/ZenpxoazkXYV/rETsFIr19qv9Ntziiit8CfMvadGQ8c+VaSxs1y8bZhsOKuyP4/l5dUycqvgjlYctjyUOr7mO8RajVV8euSCTypgkjknQgExM0rfYSECjBKiPqQ2T4X33hO/xkCBydkUTuDah1XZYodPi4MRfOKnlhFQhjAt5MvOomSWyig5M+gosmZ8kWuFlLr5Tkml0ccnAzDelhet3CqQVUO/gxD+ovQmsFWIybA0ECfgs0vvCVAc65hCb890qk7K8yUZfmTGT5MDJ/5fbpdHWaU675ejXJo/xkhicK9EGrRPixQdNoTjBDBAtgbo/dnd41QSw5reQIfktzyyT3bXRgLFlJ6Tde815rGlkDiq3tQzI96wTv0yHDHk4EJV67uhCeKlU2+f2UQEE+vYRc/6jyoXaWcm++EfJsvDNTahaunLcM3dt+7LkYbw7WohSlhBQWcsq+ISOp+yKdGva/h6Erg75U46ClWBl+DO6mOuzkRru59vsesiQkcFmWdN9gwgp3JHdMW0QDMGg/3ny3LUYzm36YWv9NfQ7eIjS80P3qLrN0ED9UHun+SFYsN6wQsBoKVQvI4CC25obEIQh7lODiqejOC1kSACocHbJg== 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: V5EpzxLug+QkZXOIbYsz75DFTR6wTeNox/B1TUFNYGAVTcZQGiPilLlPB3bIwCuUXBMWaHOCPcr58R258gPc/L8+LNlgDBoG6Rs4zKo1LijAa2LdKm6QF+P0F93VLUMgAKQUIGQeMREUOgwlwXlkZxvF9XpNcSHFYjW4OhpXHPQyn4s+WQU0RaOt2LfNilZbzwwCXCAukUoG78eQwKTlSIg6HHdJ/kn1ubv2M+vQgslTMtskByvlQ5H8QJZZfpbUK5WSGZN8Yagwnk0qRv70d6q5q2dg5KuMJBqbHRjn0LY7BsJngf6GK06sDMEQwXaMkUq3Ii9iWnLcr1oBO5hF0/SnNEJWaUwcxsPx9Dn79U/Uu6t9zeK8YeXI6Xne+NAzG/bDEVQd3M1qyQJoYZK0sw34AjEOGZ1K3c6rKGU5iuqobafwCVkFdnFJOfdJCYEeThLHxBxBhZLB2BzJaKN0jo2CTOyJV8az1a2VMvjxtuN9DZNzWQtRjsiQ6XUDMweMz2kN5kvF7xUoNz3qfH0lu8OQ4yV1YpRxPxrodvLjKxGwRD2frWTcQGBpTMyoQHgshvxKso0QlZFSBUvBIr/jFlYTPMCTCX+TWXulLx1hCTTNgtMK/6fADinGqfBYIld3nNUVIfoxQy2kaQ0RZdTS00SjjtLglUtLFO6eOPOnnmzZvlY7aothE2hzkcYQIxiN1i1GTm7ve6MX6qBirgi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FRmlbW3llmLZ1bH6FpQTqo/SfKy/1I10uPLORG1VsgWOGV2sHcBAyboHh5mSRolINd5/gCWJbxpS+rITqqfQsJ33HBSlsacuYgPwrLWu5j8ZKlhEXPNhWARkuKZPqVxlXY9EJzXpD3zDXbzqJ6KOY/gUxkEQS63HALcJ5UxePL7r1fPjUOrYqKl7uaPK0hzhlI7pLORAVe6or4M/eNSj8rkDlBxD5V9dg9mE7o2YKp7+3B2/2A8H5qCTP8+yLHqvTsYT72n/y+Nmp/wdctkJRoeYH2zG77tqWEejyKPbqshIjJfDopfPEnahzfVLde7uX7Ub+1Qu41JKUoiB9Q78lHcdgISZVcZosBAe7bIPOyQQ2IivsNPj/yy1nx9wAnyxeZn0tLAvPESO9YYyVyk8mC8vMafskbEERBnO1xGLhPgXNxPztTkfPi2wp9gOBnnEjQ4KvtiUVdk3nfXRZxP9ByaB3sy9+H6oDxq7aEYW1UifIs+nVNag3WqCNQGwoJcXmKxLK2S/UdH9io82a8RqrOJtJrCbXHWka9URqcbDNrRzte0= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: b25bdd9f-e211-4421-7b46-08dc4824faf7 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:58:04.9440 (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: YF3afwZLZPk/S324C84Cuo+DX1gg73ghtV7R5tmWSr1lhQa2APiUwnUsurPaIiI2ilA5Tmttvfg5tHDK1Fb9ow== 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 bulkscore=0 mlxlogscore=999 malwarescore=0 adultscore=0 suspectscore=0 mlxscore=0 phishscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2403140000 definitions=main-2403190114 X-Proofpoint-GUID: JPdAcQ990TmUdaWFPnr3LUflruDP5VbR X-Proofpoint-ORIG-GUID: JPdAcQ990TmUdaWFPnr3LUflruDP5VbR Renaem the existing ret variable is renamed to ret2. Since the variable err is the return variable of the function, rename it to ret. Signed-off-by: Anand Jain --- fs/btrfs/relocation.c | 56 +++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 16a3882a4a7c..030262943190 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -4070,18 +4070,18 @@ int btrfs_relocate_block_group(struct btrfs_fs_info *fs_info, u64 group_start) struct reloc_control *rc; struct inode *inode; struct btrfs_path *path; - int ret; + int ret2; int rw = 0; - int err = 0; + int ret = 0; /* * This only gets set if we had a half-deleted snapshot on mount. We * cannot allow relocation to start while we're still trying to clean up * these pending deletions. */ - ret = wait_on_bit(&fs_info->flags, BTRFS_FS_UNFINISHED_DROPS, TASK_INTERRUPTIBLE); - if (ret) - return ret; + ret2 = wait_on_bit(&fs_info->flags, BTRFS_FS_UNFINISHED_DROPS, TASK_INTERRUPTIBLE); + if (ret2) + return ret2; /* We may have been woken up by close_ctree, so bail if we're closing. */ if (btrfs_fs_closing(fs_info)) @@ -4113,25 +4113,25 @@ int btrfs_relocate_block_group(struct btrfs_fs_info *fs_info, u64 group_start) return -ENOMEM; } - ret = reloc_chunk_start(fs_info); - if (ret < 0) { - err = ret; + ret2 = reloc_chunk_start(fs_info); + if (ret2 < 0) { + ret = ret2; goto out_put_bg; } rc->extent_root = extent_root; rc->block_group = bg; - ret = btrfs_inc_block_group_ro(rc->block_group, true); - if (ret) { - err = ret; + ret2 = btrfs_inc_block_group_ro(rc->block_group, true); + if (ret2) { + ret = ret2; goto out; } rw = 1; path = btrfs_alloc_path(); if (!path) { - err = -ENOMEM; + ret = -ENOMEM; goto out; } @@ -4139,18 +4139,18 @@ int btrfs_relocate_block_group(struct btrfs_fs_info *fs_info, u64 group_start) btrfs_free_path(path); if (!IS_ERR(inode)) - ret = delete_block_group_cache(fs_info, rc->block_group, inode, 0); + ret2 = delete_block_group_cache(fs_info, rc->block_group, inode, 0); else - ret = PTR_ERR(inode); + ret2 = PTR_ERR(inode); - if (ret && ret != -ENOENT) { - err = ret; + if (ret2 && ret2 != -ENOENT) { + ret = ret2; goto out; } rc->data_inode = create_reloc_inode(fs_info, rc->block_group); if (IS_ERR(rc->data_inode)) { - err = PTR_ERR(rc->data_inode); + ret = PTR_ERR(rc->data_inode); rc->data_inode = NULL; goto out; } @@ -4163,17 +4163,17 @@ int btrfs_relocate_block_group(struct btrfs_fs_info *fs_info, u64 group_start) rc->block_group->start, rc->block_group->length); - ret = btrfs_zone_finish(rc->block_group); - WARN_ON(ret && ret != -EAGAIN); + ret2 = btrfs_zone_finish(rc->block_group); + WARN_ON(ret2 && ret2 != -EAGAIN); while (1) { enum reloc_stage finishes_stage; mutex_lock(&fs_info->cleaner_mutex); - ret = relocate_block_group(rc); + ret2 = relocate_block_group(rc); mutex_unlock(&fs_info->cleaner_mutex); - if (ret < 0) - err = ret; + if (ret2 < 0) + ret = ret2; finishes_stage = rc->stage; /* @@ -4186,16 +4186,16 @@ int btrfs_relocate_block_group(struct btrfs_fs_info *fs_info, u64 group_start) * out of the loop if we hit an error. */ if (rc->stage == MOVE_DATA_EXTENTS && rc->found_file_extent) { - ret = btrfs_wait_ordered_range(rc->data_inode, 0, + ret2 = btrfs_wait_ordered_range(rc->data_inode, 0, (u64)-1); - if (ret) - err = ret; + if (ret2) + ret = ret2; invalidate_mapping_pages(rc->data_inode->i_mapping, 0, -1); rc->stage = UPDATE_DATA_PTRS; } - if (err < 0) + if (ret < 0) goto out; if (rc->extents_found == 0) @@ -4209,14 +4209,14 @@ int btrfs_relocate_block_group(struct btrfs_fs_info *fs_info, u64 group_start) WARN_ON(rc->block_group->reserved > 0); WARN_ON(rc->block_group->used > 0); out: - if (err && rw) + if (ret && rw) btrfs_dec_block_group_ro(rc->block_group); iput(rc->data_inode); out_put_bg: btrfs_put_block_group(bg); reloc_chunk_end(fs_info); free_reloc_control(rc); - return err; + return ret; } static noinline_for_stack int mark_garbage_root(struct btrfs_root *root) From patchwork Tue Mar 19 14:55:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13596750 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 E177B651A1 for ; Tue, 19 Mar 2024 14:58:27 +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=1710860309; cv=fail; b=Uh4QINkZi+zsAa5rBsp9+DqHIM3A4Z6MGkZ7oBYp4an/GOv6bP6VuYpIrqXAwZYcXSI1PB6pAc3lEo4C462J0jv3u4iWjqDkRwB/r/OJlvrHYjTAHFHXXTqXiaZeVXqXqkV0AbZDbBKmrHhrInmL/T1f9B0sQ3QCK9kpC/PCR7k= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860309; c=relaxed/simple; bh=8qkBHx2/fgVMvoBBFIYg+KYOHXcHWlAZSP0I67SVZoM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=qK5NFrzYlIKyrz0vUzLF/hFItNEZc4mtGoKGohA4NoVjzjLr/ioOKy/gnnwWuO1K51dRFs8/8Gfd4vCIQmcOeMqpgTMW4hCECAjTwl18WtN0+WF105fs70Wi5EV4TG7FJM4WWfUiuIZaEKY4r4a71jieMWzW/2Ks4/vfGC6wMT4= 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=UMCvaxd9; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=Jeicszgv; 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="UMCvaxd9"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="Jeicszgv" Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 42JAHT1E010227 for ; Tue, 19 Mar 2024 14:58:27 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=Mz8NPVPakTqc4Js7l/NICNWL3SIAvWcEHj3bpysIyVI=; b=UMCvaxd9b1qUks5dpUphPUtGMvE7I/TufgWmB/VZFEhtEPWRgJ+SvdSRT/Rvo+dJ049Z bWtPvUvpAdGIO2IgP2OpCkq4JMfJlEmLGvimYDen0lREC/jt9VRhTJ04jRGx8/Vm64pd 5QkqP6S5jBXVSp1Kguhmj8fvzNW1RF14GOstYt7Q3ocl/Irv715sQppzC0cMiBG/ZrB9 iykimCfJVV1zuTDCOoVPfZX7aEJStALwDZCg9xRKBtIqYPoDcYPBKxl63m9oitDOz5nn dWkytC63qjs3mhpeJ9w7YU2oBY6zOOZNpcz1Wloupo2MdaaWRQV4SGhD9XOHG5TBeWHd Kw== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ww3yu5ky7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:58:25 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 42JDoDHU007468 for ; Tue, 19 Mar 2024 14:58:24 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2101.outbound.protection.outlook.com [104.47.70.101]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3ww1v6cp0x-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:58:24 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d4l867FIToEKjunNKLf289QP5m9RDZbnoayIgyO3aTsmNHlsUOUbeTNR7327Nb3+4G4aID5NmlthQj5rfnTPVJyjl/JQJg1U9RU1BKgH6Rsb6+U1rZ3gRut7BbXZZDxBdKCfYiUeRaWP6mh5amQOR3zNSwYzBla3ujGLJdO7DqCAT+DALqsEYluIFq0pO5gkxy2XwgG4DCQ2iUhQ1F7IvdVA4qLW0Katqa8DBwlrKjrD6tCIC1W0ZD+7Lq3ITFCzZwz8INLfNQYuCtrTtzD9D0AMRRIcQ3nnxR14c47tD5soWI9Y5L3STMYkZX4DOx4vE1yt9NNEeNJV5gLBFQY+6Q== 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=Mz8NPVPakTqc4Js7l/NICNWL3SIAvWcEHj3bpysIyVI=; b=eRoAGwHk6R8fG6NqC7KtborJjzAvaR2RKtw4JJm6l/NL+eZh8Lar5C47EPxrOLPuLYcPKBTetTfygMX3F6e3E5qFvmr8GBoIIVerIB8cWpVfwDx3CslwkbfCN/iRUg6oBJEtgswlpC+EvuB9v+Rvf4zUCvzOky2GzWxoe2D4dvhpa6q3a/zo9+aZ9c4WjqolzUO12IkOUsrF+l2V+X6Dz6q6XZpNpsCff/BVfior+jmcwyFzaUU6z9In3WTu2jvBjm6+LdCV+d+jYeoI2VuRNGyczmnANfcU+jPAZJNEXHNzJnNwsCMPKTHFolcKAQh4QPYp4I+3lcNGfL0XnnnFKQ== 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=Mz8NPVPakTqc4Js7l/NICNWL3SIAvWcEHj3bpysIyVI=; b=JeicszgvSiFvMw09eSZu5qENnDxlXf3AC2jXz0h9VmXypX5aT+VANv6BEgfDR5eH6/EuiWSQP198jpM4MbMAt7h0zaqn7elqen7ioOUmtm/8X2iuzn9AxBnC1UBHbyrwcRb5M6+bIDDR4Q+adwsj03vhkp76CTxGwOY4ojeepAs= 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:58:10 +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:58:10 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 19/29] btrfs: mark_garbage_root rename err to ret2 Date: Tue, 19 Mar 2024 20:25:27 +0530 Message-ID: <417f039ffc4db265a98214c8f86e9a36dbfb1c31.1710857863.git.anand.jain@oracle.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: References: X-ClientProxiedBy: MA0PR01CA0085.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a01:ae::6) 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: PxuZpoUPPz205gpMWz8wVZCHBGn7Jbuh4798eIYDva0i9QYtjiaXIAxbqzDxGRdggGP+5qSFa8kz9Y66ozqvJ8OiJGI+HC388sLYHWJC3DpvQUEzFqJleCCVH3ihehb5ExdHyHrdYvqQDXqnimc2e53GT8MXlWvGh++v8CNFZypCus+5/8DTJI8thz7SDp2CCk8JAsw0NRZAmPP+1dwGK4DXyfdGlCae6SAgXFmCbc4ysP5RJstcgKNwrW6oqK2ABpJB+eOE6WUavUXxRq79CvgycA6luVg85eDzyicAC48Sg2pFphbxaIj38ogHZUCQmx1+/HQHIz1joQC34molEUbErBbOyzSgfEzHsKf24Whi6GzNnuNAOsSQL7dFJ8opOTO2sjh4qefVq5Bm/Z99ycSRJsPsSIMJtntGz1rJVgF0fcYX6m/rqJbcGCI+blF0s+qYBgHRkGozGIKh+dZ0VwPsDt36GmqC1OSuzgheW1OYsH9t6HP+1uUGqgAimijJyKhaog18vjJZf4S+Gou1Ctf/c7jTfEOTrGocis/ZMDkjv9/nmTfn5IrJ9yWtj2fFcefvZrpi2M5DwyZedwZkKVBh7q1kYheGgbLBoVH1zvzEjEiT1GLmtSe8D2umWFxajFJsroUQ2zd3XqWVxncLX7xAh5T6H2MRmXpY3+qjmTI= 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: 0cvKyoXwJJiifeTBND/kGbwyGptrGbmDZlJIAo4wP6I6hZ9EkpgxPuZoDf839j0Vdq1qc9XcghTE64P75Qv2qbNEjm9BJWEmX2s06UMP0ek7PMYTK3pHKBgBPJm3CV5FrbEbqfRBvKqCZNkWzLwD4flQwhsNGKN9Rzg1iivsrJ5DYO6ES4fETBjih/K4M8Tup+iW5e67bcyu+eTcwhMzjpl/vU50yZqf/u3w42Ee32W4MQm2rWNtOxQ5+EGh4UaOU7GrLFr2Y9EQBFAaUgl788ZGAvqRFRoGB0xmSx+daLkK9cJTklzHO0yI/L3l4UJQyffNmi6RNP3vRfX/tAkS04ZlJn29OKIZ2SK5tdriSZ9TfquO805tBeep4JDSEtPRtXoQZa/F5xgwyH+J/RczNBjRbhi2YfPhgSMdQ1vmonPvvi7OMBqCX7/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e9BbJUz7+Hx+H6UGc2CzDKLH5b4j+VUCXXn/iReAfWntWHKKySxP0FZhqLMbWLxr7GKFuWsTYHmTHoZPQEoRCrrfvLpgST2u8371XLwu1jy+CfBPqbIvT+2mnvUi9mY+dCs38R7rDyi4Awrk1NoWZWNwQe+ X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: CjVF4VQjfU0Xw73VMqfdD51lFtLMdybofGL/v9bqpjp7sCFyjrfp2G8HrgOf0KgRAgIe5n2+K6awYlDFGqGVgRwFtLOUIfXlKxX6fohti7mIYng08U59K7u0CpsKgdwmQdrcvKvLDBiEOKiHprtmqVEvsTFWURdPeqYRqgwkFso9i9psCtlMDdPb7pQ73FC2AJWbKdyAJKBHod876dDddUWK/h5UOiqVIp2vPoixr1eoZHpfFdWyF0LMcrLk97hH0D7NB5SpxvMuTDugPGGN6ZyXaOpUsQdKk6wKMet87jKevSVbxdNn3dt2FL5Cg3BOSNCxHk749MZk1KT1EpR/g0yb2kvi3u9H0Zr0OUcPMnrVv0V5i5yl+lspzQU3w7eEI2zhCkyRhf5S5qSHPe6EqwTFZGXLHCZ4XMm8IWxrJ70pATndhGnjV8uZKYbeDVVddc9LoHdPpSvbGGiDLQPql/saJj08anwjQrWr1PUYFk92DVPiRC/TcKc6ByVW+RGiOypQBjlP1aJ/skHr0S+TDKjAuvEGnFHHGRoe7kVc9MzGiIEtJ9XTArdsedi+l/+WTewepDMBymHoh/6GDCyvyzOOLRUYzuD9CqrutQ+mBd0= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 35e291ab-402e-46e0-bc2b-08dc4824fe93 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:58:10.7822 (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: Hent8fyAdZm/3bNAA0V8ZGtHSL50hRckDocxJXFpcNRgs8ZcKMkoA1cpaORmmtGwqgMUHYIyxoiEq5+thLTNpw== 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 bulkscore=0 mlxlogscore=999 malwarescore=0 adultscore=0 suspectscore=0 mlxscore=0 phishscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2403140000 definitions=main-2403190114 X-Proofpoint-GUID: tCNuskWrJEmekk-iAcq0S4P6E76EbYsM X-Proofpoint-ORIG-GUID: tCNuskWrJEmekk-iAcq0S4P6E76EbYsM In this function, the variable err is used as the second return value. If it is not zero, rename it to ret2. Signed-off-by: Anand Jain --- fs/btrfs/relocation.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 030262943190..6f8747c907d5 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -4223,7 +4223,8 @@ static noinline_for_stack int mark_garbage_root(struct btrfs_root *root) { struct btrfs_fs_info *fs_info = root->fs_info; struct btrfs_trans_handle *trans; - int ret, err; + int ret; + int ret2; trans = btrfs_start_transaction(fs_info->tree_root, 0); if (IS_ERR(trans)) @@ -4236,9 +4237,10 @@ static noinline_for_stack int mark_garbage_root(struct btrfs_root *root) ret = btrfs_update_root(trans, fs_info->tree_root, &root->root_key, &root->root_item); - err = btrfs_end_transaction(trans); - if (err) - return err; + ret2 = btrfs_end_transaction(trans); + if (ret2) + return ret2; + return ret; } From patchwork Tue Mar 19 14:55:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13596752 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 8453E651B7 for ; Tue, 19 Mar 2024 14:58:29 +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=1710860311; cv=fail; b=BiHt2Q+Oc88i8aoX9k9mcInJd5h/2em9XEhyYCClog1W14pNmtt2QWxctwW3LyhgNOkw1lUQMUfSHdgwZWTbyRwe9bifvHl56RJpix6iB32IGpT0i11Dds9iWWN08xRD+7BDQglsgIF8NnYAolajVxFYCmG/LuYHet5jaflKtyU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860311; c=relaxed/simple; bh=YLnB1Kpfzy+HwwA4gCZlqxcG0K8K1wLTelPKX7ABTDU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=pf1vsuq4snQK/rFaplENZfF/PzlmgJ/RCgXp3xl0UwchjGuxDzFoTyYJrYCH2W10Vn9MOYkLhuLlvlCEoEgIl2ByUCrIZ5bK7P1G4S2Kx9nNcO0UdyIRpvl8pVyxWWJ/OJccnkaW1hLFXvIA/Z94l9nOfVE1TW4LxUAyCT0MOmI= 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=esBo2Nzo; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=w6HALz4H; 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="esBo2Nzo"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="w6HALz4H" 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 42JAHaiL004983 for ; Tue, 19 Mar 2024 14:58:29 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=YkzG6pnrTsTGn/RvXw0hMonESIHMldKAm4epdT+x3CA=; b=esBo2NzoIxxlj+9KJPFWrMEo0k3xGGM1ncYIMecw5iACmE+9RrwHSb3I2xv3ofexqbNg mZu2xDpvyUVrWmlQbRJZVMFtlr8aGHY2ySPdC94eoYfcbs15w5a487E+XxzNdyhuqEgJ w5zYyW7oShgBpFHM9KWlnz39NMCmbIPdS9QI6g89hfXwvrfyYR8wSHEAHAYcMmLZm1Ao sCeKYJJyVy27qrsaVlfGx0Pw6/e+LRK8fctCU0Q5rTXydVVVTKWSoaqC2W2PIVMY6V6j ZIFpgVwD6MG46c2KrNibpOhbguizwZyqQVi3XNs18F4uG4mGNThGxPJxAJU0T25lwrNP 6w== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ww3aadnjd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:58:28 +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 42JEKOu2015748 for ; Tue, 19 Mar 2024 14:58:27 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2101.outbound.protection.outlook.com [104.47.55.101]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3ww1v6v86h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:58:27 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fSdja1H4Cs49P68BNUxfzYKPMWVZrcxqh03syy1+D/sLEykv3rstNTk+8GWKqcVcdbThNAy0rhbrAsi/pBxevmGM2mqygsGcRfZ3TaEgF4VhSeKGEsH4CebWZSbkXPwmfadtV2WionP/IgFQ0Q6e2pMqWPrxzIo0SqeZw3XRV4FIQ/0xHXaFF3A44cWeiSDI0zNSKusjHe6wk4UGupi40NERnVKrYjfCW9R3KUL+VpSiPqIUuFRMOjxsQkB5Mv/A0xV263UxVprdJXAGHNPZxY7Ky7DQ1r12DSyyyXeda4qO+Fb4CKL901mysRrVowvJxW8fSoOVSpBO+GRc4F/E4Q== 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=YkzG6pnrTsTGn/RvXw0hMonESIHMldKAm4epdT+x3CA=; b=Rc/1IghnaokNTvNWnyIAci8Ykey/R0RzL45jlbXi9iTKGE+EgwY+Pc6JrvmIJZ8lSJnsqTBwRESnChzRyP4tQQC2bIIu4X+rFGpaJqU6UP5PpJX343qaS8r8GuJgKnnfFPvsWrvlyZpzSdpPCz9QaR2pVCqgST+f5SSPUXW2NykMWVQRJpVrSIlwLL0UEWzb9Sz8oPTtDYc0Hynk2kJBz3vuubJQ3xOPkwXwY7TgohGA2K2tlPAmDOLsbYHSVbxqvydaxb+Z1qSKx2d5/m2Be5NzNszcXfL/QWZ8QDOoh/uBUEDeGLyWX9fbUI8UYkqwk78x0XLlZnwTMnLafxby2Q== 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=YkzG6pnrTsTGn/RvXw0hMonESIHMldKAm4epdT+x3CA=; b=w6HALz4HKfhlLMGmOS9XePP/azAQN3ss5+Sok36tOZ4lDCxzJNxCk9IA3g7wiN0ryKZPWsG/oi+5spYQodjSXxSVQWIWCwLrg99J3StI3w7hPWb7FnVyXIEOY3RzTqzP82Lyep//ns5Mw94EOyG9eTkQeDPcK3oZRI1ZAZMqAq8= Received: from PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) by CH3PR10MB7460.namprd10.prod.outlook.com (2603:10b6:610:15e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.28; Tue, 19 Mar 2024 14:58:20 +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:58:17 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 20/29] btrfs: btrfs_recover_relocation rename ret to ret2 and err to ret Date: Tue, 19 Mar 2024 20:25:28 +0530 Message-ID: X-Mailer: git-send-email 2.42.0 In-Reply-To: References: X-ClientProxiedBy: MA0P287CA0013.INDP287.PROD.OUTLOOK.COM (2603:1096:a01:d9::13) 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_|CH3PR10MB7460:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: e9f6XaGoSJlZmUCMNOTAihL59aCLZ3DaVDpvQ+uESAJ7RDaEyu2zvgQJsANKaxPr6Xthb9Zd24Bn79y5YWk17lOY/bU6qmZs/2iGOWwDQY97KOF1JFdT/e4ZZvkjYTDGEiF+DHpH2ZZPUZY+SuV/QTI9gFIy0vt9gi8tHxP7mppacBXnkYW095a7KhEs5exQUgpSlDJPBLxsTEn2POmIQuQt0ZkeqGxG4ggj+XnIC3DK3c4dT3z7IhHNImd4nGVjiILvBRmjAUN0FPmAfvmxuB3Wu0HXZKnDH6NY0g2v3SdRJ6mUIKa3e9OiVNDs5naZVCrZbmaTuwP4ORZ8sSd4oJNTuenDEmdIX6/xIekdMYhll76EkmtNvUvWZhkj6iMZ+MwCEfyHiZjrkOvc36drKOcXNjFT8mT4T2hvCZg1Grg29DFEc+zWwImEq9LikpDxYmBnTgTJCTrLxEXSwd+KsFsPwg1y4oU26wz0G8z5M1SP+Lnl1ksPZXjv+OeMML3TH/0vXe64bTlaIrkymwo2WHJNw7DwAdq71v8IoGQNMOMoEZsC6+zwcvy8kJyp8udyepQ5S34zhriuKb26LHSKkDMIMaIZKk1YLlilPFWdfO/CMvnhIuIfhInMkRse7p/cNSx+jNztk9956zAFI8jPlYy8cWR8sgJMHX+fti3X8Zw= 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)(1800799015)(376005)(366007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: p3x+jpFPTp68CfunEJMif+CxfHaNF8UAUHwH7p2BJudECShil5pJuGJmk3MYAetfc1plzcX8I4xokFyPU7NnIx/ckRUUUz7kY3cwEz4qmjO3EI9SmcKQuY6g9I9wTKK0gQzFfy0tmV3+OMk//FZzhxFpWwgGftd3vyZUHCIIE1gLICIXC/qPJ79+4YemM8VQ4zcoHQU2bUAj/KP3KDbh0kavOnMHt44oS3gaFtfhT+8UAzpP/NkEb1wF5jey3+gXkzV5gLo6je0q93Lt7zxT+HXv1cBRbhPoyuhQqe+Zn4LTzvZwgQVuIlggd+EXSfOuJGvFNetEWH998b1g+hn7iTtwoYl+JTfoizqUVlj+ftfEMza+v6tcnmdBpYrFhr8biybVqTN3eqBmYiwSaO2cgDrZlp54ZbG5/uKqLDZkG2lxBjtP5cqxCgk62ghvVE3hWUQRU9XJry2q+VFgNB9eAFzcRSkn9yC77Ww1NunCPciGyOSI+sGnSgPkbhzuSLg+o3LR/qSUOFOcFUDn8P10d/bxIJEF9PO5ZVRXRKmaQdrQZOfB+3BzorCRWUHCfxpQ+NO/bJLHv4MmSuYE3lPlbVC0IXTvkCx3pKMEHxnWdpt9kHps41gAJef/cF/WGMfLcEIYw7ZFCp3eLxnChSgCKdJtiTrI1vO9OA8y3i/SqGut5OTYvKNvoMzXobFceY3Aey713nOie0uR8v5X+csmRCeaUkVhCZliEbWr5diFr/DZIlzkSbtx8QsM6C4mKqEa1jrZsYaj2rQ4VkzG8uxBCC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yFE3yAJ70s9DcUD4+XGqT+exXcAte9Ghqt4/qEKMqO0vSx94VvCtc7DVNpZ167362b8ofQzdUeIsBa6XYAhmo57OJTIKz+BWs7QqBOLEWnaQQmVG818fOJMueOcLybOc8kQUXL+IGsJmBrvGPulSvTA074qpbUqVVtCZQNucc6XstoqndZB5Qs69VIl1oKlMocbrW5GXbwN0i8GF7GyhXsrsUMoU41jyxoz2Q43KmbDOUQbCMsiW5rujvJV+b9WwVRT8i63LOgWBwchzm/BpCPOhkzM1C/RZf6SU4CdAorWA2cV6mlIVAyvNiHc2U2pu4aa1pLbUMXV6+i9FTsZs4Kh34VRVNdgc4g9/KMIi8v1g1OcN2d/B6Bu7iXbwAgK+I7rp1lUi229tNZz0gh22dSn4oURBYO3lx2TEHm0CWldOPCKaFYYewPtfcuiP3fAFjPr8EGoHfMdLJoCz7OmyIkqct1NYxTMYgMsxLj8vORlfY0L1IDYlFae1JPcIPhAk= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9ead0116-0429-43b7-ad5d-08dc48250255 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:58:17.2926 (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: vwzyINFc3NnReYSZYx0AqvTbIYGm7Q5Qp+W/O38Aex+nhVzwmKu0z7axa4y6MjGe53zxP7hayr6EqY3nD0PYlA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR10MB7460 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-2403190114 X-Proofpoint-ORIG-GUID: APaSpEEEgueCambpPlJxtvoolhZAAXgd X-Proofpoint-GUID: APaSpEEEgueCambpPlJxtvoolhZAAXgd Fix the code style for the return variable. First, rename ret to ret2, compile it, and then rename err to ret. This method of changing helped confirm that there are no instances of the old ret not renamed to ret2. Signed-off-by: Anand Jain --- fs/btrfs/relocation.c | 64 +++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 6f8747c907d5..ab3d3d2ed853 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -4260,8 +4260,8 @@ int btrfs_recover_relocation(struct btrfs_fs_info *fs_info) struct extent_buffer *leaf; struct reloc_control *rc = NULL; struct btrfs_trans_handle *trans; - int ret; - int err = 0; + int ret2; + int ret = 0; path = btrfs_alloc_path(); if (!path) @@ -4273,13 +4273,13 @@ int btrfs_recover_relocation(struct btrfs_fs_info *fs_info) key.offset = (u64)-1; while (1) { - ret = btrfs_search_slot(NULL, fs_info->tree_root, &key, + ret2 = btrfs_search_slot(NULL, fs_info->tree_root, &key, path, 0, 0); - if (ret < 0) { - err = ret; + if (ret2 < 0) { + ret = ret2; goto out; } - if (ret > 0) { + if (ret2 > 0) { if (path->slots[0] == 0) break; path->slots[0]--; @@ -4294,7 +4294,7 @@ int btrfs_recover_relocation(struct btrfs_fs_info *fs_info) reloc_root = btrfs_read_tree_root(fs_info->tree_root, &key); if (IS_ERR(reloc_root)) { - err = PTR_ERR(reloc_root); + ret = PTR_ERR(reloc_root); goto out; } @@ -4305,14 +4305,14 @@ int btrfs_recover_relocation(struct btrfs_fs_info *fs_info) fs_root = btrfs_get_fs_root(fs_info, reloc_root->root_key.offset, false); if (IS_ERR(fs_root)) { - ret = PTR_ERR(fs_root); - if (ret != -ENOENT) { - err = ret; + ret2 = PTR_ERR(fs_root); + if (ret2 != -ENOENT) { + ret = ret2; goto out; } - ret = mark_garbage_root(reloc_root); - if (ret < 0) { - err = ret; + ret2 = mark_garbage_root(reloc_root); + if (ret2 < 0) { + ret = ret2; goto out; } } else { @@ -4332,13 +4332,13 @@ int btrfs_recover_relocation(struct btrfs_fs_info *fs_info) rc = alloc_reloc_control(fs_info); if (!rc) { - err = -ENOMEM; + ret = -ENOMEM; goto out; } - ret = reloc_chunk_start(fs_info); - if (ret < 0) { - err = ret; + ret2 = reloc_chunk_start(fs_info); + if (ret2 < 0) { + ret = ret2; goto out_end; } @@ -4348,7 +4348,7 @@ int btrfs_recover_relocation(struct btrfs_fs_info *fs_info) trans = btrfs_join_transaction(rc->extent_root); if (IS_ERR(trans)) { - err = PTR_ERR(trans); + ret = PTR_ERR(trans); goto out_unset; } @@ -4368,15 +4368,15 @@ int btrfs_recover_relocation(struct btrfs_fs_info *fs_info) fs_root = btrfs_get_fs_root(fs_info, reloc_root->root_key.offset, false); if (IS_ERR(fs_root)) { - err = PTR_ERR(fs_root); + ret = PTR_ERR(fs_root); list_add_tail(&reloc_root->root_list, &reloc_roots); btrfs_end_transaction(trans); goto out_unset; } - err = __add_reloc_root(reloc_root); - ASSERT(err != -EEXIST); - if (err) { + ret = __add_reloc_root(reloc_root); + ASSERT(ret != -EEXIST); + if (ret) { list_add_tail(&reloc_root->root_list, &reloc_roots); btrfs_put_root(fs_root); btrfs_end_transaction(trans); @@ -4386,8 +4386,8 @@ int btrfs_recover_relocation(struct btrfs_fs_info *fs_info) btrfs_put_root(fs_root); } - err = btrfs_commit_transaction(trans); - if (err) + ret = btrfs_commit_transaction(trans); + if (ret) goto out_unset; merge_reloc_roots(rc); @@ -4396,14 +4396,14 @@ int btrfs_recover_relocation(struct btrfs_fs_info *fs_info) trans = btrfs_join_transaction(rc->extent_root); if (IS_ERR(trans)) { - err = PTR_ERR(trans); + ret = PTR_ERR(trans); goto out_clean; } - err = btrfs_commit_transaction(trans); + ret = btrfs_commit_transaction(trans); out_clean: - ret = clean_dirty_subvols(rc); - if (ret < 0 && !err) - err = ret; + ret2 = clean_dirty_subvols(rc); + if (ret2 < 0 && !ret) + ret = ret2; out_unset: unset_reloc_control(rc); out_end: @@ -4414,14 +4414,14 @@ int btrfs_recover_relocation(struct btrfs_fs_info *fs_info) btrfs_free_path(path); - if (err == 0) { + if (ret == 0) { /* cleanup orphan inode in data relocation tree */ fs_root = btrfs_grab_root(fs_info->data_reloc_root); ASSERT(fs_root); - err = btrfs_orphan_cleanup(fs_root); + ret = btrfs_orphan_cleanup(fs_root); btrfs_put_root(fs_root); } - return err; + return ret; } /* From patchwork Tue Mar 19 14:55:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13596751 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 A17C1651BD for ; Tue, 19 Mar 2024 14:58:29 +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=1710860311; cv=fail; b=ZcurAG2jW6IGAmCNyXtDH/Is7qzfw0kSeBwFSZWSRc/+yx5DwMjGXR1H/ElHAwC5mTtEWlPidsjQb58g5vcrSFSv2yuJNkMCP9bgoMEMOVKa1VVhxuMWALj6oN/k49fjbLDrJs9ZbuDdhTGzkqajVVK1raoJh49eoCEg66VpFzQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860311; c=relaxed/simple; bh=MpOUtukWvQQtZSpzmoUEkiBRr2eS814J4ex4J+TGqHM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=ob9GIKj5xdJvY0vs8Ih5EAoXsImJbBP+83uqEhsbxLdxFn2WiL/rR9uojDTnGC/zjZ3z7GxKP50xMetKWWOQulr/42SE6lQKX5FIpfCB5vSGxpZCzxJYxXzi4xl5WQgSu74+daFB+9PsRI5IwcZGBP5JNsGhyx7qUGyGe+TUmVg= 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=Kahsmesg; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=QK1wy6ic; 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="Kahsmesg"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="QK1wy6ic" Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 42JAI14E010964 for ; Tue, 19 Mar 2024 14:58:29 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=PBFmmBW4nFo+X6+72zVA7nLVje+E5nZAi8Tk3B35OrM=; b=KahsmesgeuOspyLdsxPy4zqRYf1og+rQ7iQO9rATdJCD9n164AGeaBe8dm2jbEsNNuO7 l8AcK9NZhQxJRrai1RmCLhP3yEh3cb8Vx2gKpcn4vH8m3xbiyUy6i3o3iG0BQ3aDhyru MPLw22vL6TrSdpXQv0gBpDMnCcjnOZmb5WbyV7k8LRA93zH+V9OfRrTVnJjjcsPI5E56 Jnl8AQ1NDn3fY/ormZxN0TE+2s6cwDkkJvqMhjKDt8qdYcK0sHtI+iMTldRKpfR3gPKZ 06pHQHenYi6bj4iUIq5HibT6fm0Qff1th96laonpyZBAxF3uUJAbZ+qmmMqRsdU702Fg 6Q== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ww2115reg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:58:29 +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 42JEKOu4015748 for ; Tue, 19 Mar 2024 14:58:28 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2101.outbound.protection.outlook.com [104.47.55.101]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3ww1v6v86h-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:58:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FozG1JDIYOuQ7l6XKTjDtUL+Hol46LaKyKIV7WGNCUAT4T1i5r2DdeU6ip+d5GIOf3TYdAycPSBJ0TUPQu0U7RXcKv1jeLF5k5i1FUSVwnzbPScRGLVYG2RsprEz9xxr+M1JryvWogR+WGtxvtcNWMGHFveH99KFkUxZrCRf2EMb+wMdQwHXogTd1Y1aF/Kubef6e2fecBHukGbOOimNrxYBd1dJXctk6u9mIsSq1O+uDw3T2oRa0WvR3Ge2cZxkcl/uF94VgZs46BISRgn1Ehud6OmsbwQ+Q6po3DKcnGlvLlf7FXX8+k8K0m/f9n30UaYWS9S9SydvnpbWFOnyFw== 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=PBFmmBW4nFo+X6+72zVA7nLVje+E5nZAi8Tk3B35OrM=; b=Ou31qMbQnTcbfYUJfjcFDE8H2i/yPfDb/y/r407PcL7LzlVie5ExR1H9WuptiPBmira8hTrPHhp7tPEIr9mYBsEgf3DBLaLIPyX/fjA6JbKicsaGQy6xOH4dOA/f/TqNgCOCbzjAHuFDytJLX96l16/2kH3kPrd82iI6NQicblayaiYsC0ijFd5d9VB+khYlU/PFmmpGc1ChIL5kYNGSXBdGltNhbNs2V8eJ151t2CbiELrKQ2kYRfrbZPL5dqemIM+qIWF0KJTaixHFK3hhAGF1ZXy3ixBH2PJikEuDnCsLmXA3lPo1i4cQPI9gEXTYuQuwHLaX0xuhOSPu4QwTpw== 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=PBFmmBW4nFo+X6+72zVA7nLVje+E5nZAi8Tk3B35OrM=; b=QK1wy6icTbQZijhFGtGokLCR04C+IhFKdKoQEcOR1z4s9L6IooMX6UvsgupGGq1M+JeyTR7C8vyybua02czESQOGfW02UuCJzm9jM86oAuf6QV/xfjF+RXHGF+HliyVjOtROluQqFDXDMID/OutKf/Fg8fLVsg4Cu1jzVZlm89Y= Received: from PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) by CH3PR10MB7460.namprd10.prod.outlook.com (2603:10b6:610:15e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.28; Tue, 19 Mar 2024 14:58:23 +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:58:23 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 21/29] btrfs: quick_update_accounting rename err to ret2 Date: Tue, 19 Mar 2024 20:25:29 +0530 Message-ID: <1f4bdab06e7acee3118c0278d7f16a352146ccf5.1710857863.git.anand.jain@oracle.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: References: X-ClientProxiedBy: MA0P287CA0011.INDP287.PROD.OUTLOOK.COM (2603:1096:a01:d9::7) 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_|CH3PR10MB7460:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zTNEBOwU7GLBueqKtxwandD+vnJtdXDuByRagZjDKtpGI6UThC6tCqpcCSvYO4OFcYIry7BA2+O/+WB30j44S6T7XQNfc1aswThrrRtXx9yQ+/24rEcxpT0PeZYGqAeqtdXU8AHqIVZbqqBewDo84gEqx7pymHQOaewA79LT8hZLd7l9o1fCaLN8SqfmI3CPXCZOQq/9eTuKZv9f7ipprpHzo68Z80k+S7qrIzrd586uZhs6S+8WRMxE8ZSYcgOMRpVtbNheGfWboo99tv5Un3HH5VBnscygWh3ZF5+SLhqqYj9d+/C/dqjWawb/gLW29K02k/kr74xxkVckYO9jg1epTRD8BFDj8jkQHRes0xVD1Z9II6PE4k430pIDBfh+B9rIcPgOHHkx0F4bw9EIEdvmw1gzXB5pR3ogRzgwDNK8dZpDGv8gk3XBTA61/2e+TfCwL5EqfgPl82oXT6IyJL1sWhJVm0HlmS3yB36S1jStDpoY9JllpTfp6miPrN7S4t7mj5SezQJKp2n7FiawDux8JjL1T3jJTXSJW2rWlGoFg1NPoBG7kkqXvp/gVh0waj5ROcYlKxuYD0KN8KZ8MT1A56wNEdwoUqF6wiYjmk09jf/5vCLx7svJj5YLCCDZJ4F+QYRfHvSPgQhVz3O8N/oGD6k+Daw26U6Utcq+rVw= 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)(1800799015)(376005)(366007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: rV0kfj8IsaJr7lcyp4LhUEbD5fF8NdnbM6oxEu7h5Dqq3Ub4v7y7M5kYHPEXigMm0oPTVzfNd1d+ErxMSGOLvm9CK6ZalADMx0uPCWBbHcnRmiqBN+YYZOYpUn+D8MoU+bisraGeTgWsPNArrpzTH9R7KM+v4rjLGqYdDO7upEzHRDOkOp+m5/1tqAR051KSpAIVq5Ajs8xt6SFzTIyaJiNGfW80UgEaA5nLJW2FzENNufCf97yUWGqVub3V9sFdRv2SZSzijl6ItW+9ZmKeqI+KXd7Udi2V7BhDe8Eh9OrJD+q+Z+aXKHFW/ia9GK78F61MFggMd8fBM1ofaIoqeyEa/K++nWz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eQYHgXe0ubh3nb9r+VOOrQgvoheYrKVk4+h+BzJiqCZQbLUoY9wH3swuJGo4qIlYXAv9JWZ/Lu/kAsFYo1g4WjNg9wmE5DNxBaJbcEUyjr4tdUY8O4spyI27jgyjeh0WdeV9+spzN1tsIXmxTaRPFo3nW7ZgTMpvP1FNTrxg4xW2/lMBRRnHmjGhTU3UAjZr1kJrKZEepg6GIGfTQMTgfZiw4deyI X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: tiWJnEcVersBcDDr/ixZN7AMBV5zoA5P0chu1NX31AUy8i21sDtAkW8h8VaT5v8bncfooVeagve3oF3zpgP0XLGXy5cDLSYpdt1yXYCI5TxaQQZe0ONSqjne7dd3/tLQELeWJphFRdaXgBjfxd1EbpL8PQtAgYTUaOu8QqblKIGiLoglQbpOfPyvkwViY5NuiFXa27wkQ5FtBiXV8Y/gVTWHM2P6Z+S4uagx+KBAY0jTy8Dyc0gioHcGjm9THoXxEPdPEFE7QJYtbvPJxKU4O6O+rJW6srUkOc8huldVxjMzDoGl5K6vFCRe6TedQFXNyxgjzA1Slsoe3eh1GpCKsFq6ZcWJVHH1yUTYU9c5yZJNjNYImckLVHp2dFs8o0M92TcM6UD8xzIy5xm7/iRgjom13AIoPaIhqtEEbEAZQnV4Y4iwq+zfNl7x1OFwC0d6HoGAG3VXC3xRLy3hoidmMKTIuG0Bm3GCo5nKPn5EW6XHdc3N+MNTl7KTEKZ8ibJYFNp6XtaUUeDt1qDmK/n8vMmG6dTnTF3cBtGFWjg5Jj7lkff3I42jQN2lbsVE9cDJzNUSYS9Dq5AzzHDlitY1+ONVYsoICortw26N0pDrKXg= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 94d9136c-f30e-4c40-cd07-08dc48250607 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:58:23.2975 (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: Y4UA+HQBXQiozQyqFKizdtvWLtfmyTK22lBz0LL4J/s09DBulr0eVL0WwEBM8P7xzO3KE10p4n90GlRaPomnTw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR10MB7460 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-2403190114 X-Proofpoint-GUID: gaGHgc2lVN3q0mw-phEOyHiKZhtf2MJz X-Proofpoint-ORIG-GUID: gaGHgc2lVN3q0mw-phEOyHiKZhtf2MJz In quick_update_accounting err is used as 2nd return value, rename it to ret2. Signed-off-by: Anand Jain --- fs/btrfs/qgroup.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c index 5f90f0605b12..23a08910fa67 100644 --- a/fs/btrfs/qgroup.c +++ b/fs/btrfs/qgroup.c @@ -1541,16 +1541,16 @@ static int quick_update_accounting(struct btrfs_fs_info *fs_info, { struct btrfs_qgroup *qgroup; int ret = 1; - int err = 0; + int ret2 = 0; qgroup = find_qgroup_rb(fs_info, src); if (!qgroup) goto out; if (qgroup->excl == qgroup->rfer) { ret = 0; - err = __qgroup_excl_accounting(fs_info, dst, qgroup, sign); - if (err < 0) { - ret = err; + ret2 = __qgroup_excl_accounting(fs_info, dst, qgroup, sign); + if (ret2 < 0) { + ret = ret2; goto out; } } From patchwork Tue Mar 19 14:55:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13596753 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.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 904CD651B7 for ; Tue, 19 Mar 2024 14:58:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860314; cv=fail; b=KYcrSR3GUklhis7ctBqhNBFG0J1mz9cKgsscOLdIS5LsFoeQDux2wBrKftYzcjKCxDiOQmsKm/+UYnJe5hb3HnUiPrxgjPYHDTc1iT3ylZRgSFSrwM6Vub8vMoKm5miP/QxjPD1fKu0TsnrweCeGaxGSj5o459/Bbl0scu4LVAo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860314; c=relaxed/simple; bh=nA+3hVpi+JyW4IjuzuQXFPE71Hz0n7Dd3JUf4ucMY+E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=sY2b2or01m2GMZr1Pl5s2CN/YE4yzg1DZG1/lL+Yz3Q7bIRkOXu8iehacjZEQQfOiz4NiB78La0qkKHpzqig1CNq42MFDSkVPwqA3yZsnDRpxmrmvPvvdyaDfXxM1tC7Eb/W8vUjMAwZsAMNhaI34UePPiJAebx0bdCsOObrmqA= 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=nbG34u87; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=iEwD/rMW; arc=fail smtp.client-ip=205.220.177.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="nbG34u87"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="iEwD/rMW" Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 42JAHt64005358 for ; Tue, 19 Mar 2024 14:58:31 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=1l4QVfni4oBgKNXlrusgxNBJMcmFaOodirHV3m3jzfw=; b=nbG34u87psJCgSNhXeYEQ6QBQVt0k7lXRv12gZbsA/E5JDskIIN4g3ruFxVBvZOKbXA4 cCoHQV3DI20zQz/gSguRRcgbpM+9FYNGcLC0Q1jDhGfa+jnGA7yqmWik6j8UkQ3yHCuA 1iUsBspl2rlQpI9XzsQj2D0kLwsTfQQTAywKLPNJ2b9Qn/szoN5HLpghDJrhwyaD25NQ zIhjfmIniTB+4e9KNvLIsttD3kjIR15978M1eaai0WRgM1XOzXgpSxCt11D62sKmuj2s fPL9D9/nAYvy9nzQG6dRJcubhXKbe9kvlm1yqb1O9EDS4n0Ki52EMFliaRRKh6IwAQ73 ug== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ww31tnskw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:58:31 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 42JEKS6H028734 for ; Tue, 19 Mar 2024 14:58:30 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2100.outbound.protection.outlook.com [104.47.70.100]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ww1v6c2nb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:58:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AjJvz+o3LEGVDeKaqycMnhBwA2qYV17pRTVFAw7x/vhxDri/S0fDU5tEmuZ5wQsKgbGfHxhofNiCDksDU8d/ueXZOX+jdbAtIRrYVTo8ptmsciqCmaUi+5wv85go1vY61fGfgANkLQKRVIaUn8KcStys0TgEugvY7M3UcVwWVjThN/WejPsBHLjXFs/tHL03fwATAYqOGO8oWUsLArZuw9pU41oVHmXEPd1+w5P6wy3poEiuodgELZN+DqVZZ2YP6j934iQZchdx6D6P04g+nzOktS7QSn/0IytbrjYwuE+m1pQOECKNdv5n802YkE+Iv/e/srGWBuQEL0H/suunjA== 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=1l4QVfni4oBgKNXlrusgxNBJMcmFaOodirHV3m3jzfw=; b=cTEiaazscZ0p5Y5VzwSFy4OvTGWt1bqh0VVE8zpfxMBSfaie7eREB0W1dhJJoafUNor6AJzl9Zmq3SstOzOmsSJN5DMDuvhbuM54kUd4Ay7OxfFKiNxPRggvLZ8+gsycK8MD6EhtbNMeBVSzLI93MBER+g0J1qbQqEzEVAbj06zQhasOCjJEy6K4T76xCsusZKtQBUDivPL17Ql+/yS8wiFtBv8hrMPiMaffIMdo0thEm9uu4HbHw2Xd3oyovxbv1ep2kRrI0MeIzjJWIwkK/8JmXvdLx5cqMXLn/E81wZlHxaVaFHOTZ+otTLSwSoErRgs5jPj3uGIeVp/WGw4tVQ== 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=1l4QVfni4oBgKNXlrusgxNBJMcmFaOodirHV3m3jzfw=; b=iEwD/rMW32bemdX/8TNoMe1FzRoS4R2nSqFf1clC2VsLlEtj/x+CXFVoLHHvNTcYejWcuecEn7dC4nvZHChgITKIAelPE/6C5KZu5umqzpsX+84uKZxrl3lZiItezm8r8bwDfZpJLKgWULT7ifFBMNY0k6JCxu8gUHNAgZVvETE= 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:58:28 +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:58:28 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 22/29] btrfs: btrfs_qgroup_rescan_worker rename ret to ret2 and err to ret Date: Tue, 19 Mar 2024 20:25:30 +0530 Message-ID: X-Mailer: git-send-email 2.42.0 In-Reply-To: References: X-ClientProxiedBy: MA0P287CA0008.INDP287.PROD.OUTLOOK.COM (2603:1096:a01:d9::19) 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: rOOLC1yQ6gpnKC6SLElwyGK6miAypvi2to+PryFB0QJZOYXi2wp7Xitm6rcGufhXOkfIy82VvT/9ReSAji+laKIOevx2eXOquHrSWVbgFA1znzSdLIX6g6SPZD9RKVHOD423Y7fDeZyiPzaZN3ZtRzs0Lcfwkzs8bcRXT2MUqvEeUPMbrg2165nByTJAcmjceJjAsMjF69iGmQrjayPlMr8GLm3eq5uqU50hq6WjU91f/XimX432LQroWTIkSC+kjR5g7S9iagUTXKlzVgDvnUtup+EkV1Ye99oFo1dCpggUfDObaKBg2DfioSFVvMDRaOtfVwF1J99sZDx9ceUwaz+DRxfbsr91Sn2fsMXq3wI19U2FfdoX8N6AFBJTBwYTGBj1AHH2kIL9r+11KF7x1K5DnTpTdF2Phyh0C8QDelWQSpzLZjbl5Fg3vJqx4e9/pLHrik/pUZsJtiBRAOCZXvJQ5JpAP46leZhKRjD27KEy4udROsEEesZzLtxNGk9Y3VHMIx494nud1EKT4+utjkYoCYW8aw1JISV9A0BQfnk52ht+wymrxYZg/w3RwIjYLeGDf78BeK88ax3BX/OjTXgPEAdHvGWKyEW99c9YlXzKEArsd5EtdAlOOqL7T6IapwE0RjBqEr+k08OEeln8AUIAfRJsnTDTx1zQfyczjrQ= 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: V7cCrDb6m1HVGvxJPtKHzRSmF70y7DBuKPI7NGAjQC5ABA0c8gL8BL8yddw87UzwQXD2U1Dn9UbxvfHAC5zVKyn2uwtGfBD+PtPuCUS9plEidm/9tklN5yxkEQ+OtjCSuuuCMY/jp4g7p+ic+EM4uadc8arh8yhYSMgEhT2WgC40zOWK2+54l6+08DAi5RYib6/koU5qleO4haLj/yaamAuHsEqxZNlYso1XmBPm4Bb56crayB4aF5dCKaviejdBbBD01vNfXpLdf9qoa8U7NZzfi84yaQ6GZjaHVvQVba0kW8VPv31ATyFr2OuQ81uYIkgqO6e10GH8m30maYdaeXMczcxV1NwUULDuW8lL8wEmWvEXpg0ryOa0atDtHemfuHwxhpNStyeI1eBH42EjFJReLJOSy64EdgtW5F97jRSyxd2KZRYdqTNKSkwvvvYgiiK5Upwn/u5e/08rKm/lzkeiHtNRPMBIrG7ZSASigR0i5AyNuiV/gieJhRRhLSz1TxJiKkZ6+kjsEOWWUNlumMZkd3lw66m4TIdXsyRnB0OfBEBGRYQX96fMU5Y0Dtjf9wC0fqW1vUHjeWhJME0pjxU6vJYoItDy4tvTU93p/IXE94zK8moJmJ0Ofy/1u+mwJLxOgOM6ysoDj71OfWo4tuBFXCJok1Vf/CMcA1mY1FnButnDx7PNT1hAWwmQ/ne4Z/PnrRFADiFG+YxXHJMKlniq3hJY673Znd3FZ5Lp8jtfHf1gmexVVlKMogJDxart190rgu+qZR2gSTOWB1PFF/ecC0zYUP4/w0siOM8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h6HBDkqDJsOnN9z1z18SL0+ERZrJkn4nRqq1v34HULaRpwXfupuoYd4gx4QrDWVqHVOTbl8Bvr7pdB9vcyTjyiEMgNtIVppOFzGrmw28QYxDKpiweopdo8zacXWWAWFhKoELmSAjqS6/Ox3FgFDIZ35SmsFcNMc0xMxBVxqPPQdEkmDOvJ16enp/k8ccVCM2EvbX8sCtKJSIQC39y7VkYnYBFL/yrV0z6UMNkIFFUqf0OyLidkT9lACEDf8WfjPeETqJRdxbVRiXQFoUpgOxu/NSWjX1OXVbXAZle35htUuFYGH97E4gg82bq1gizbWvPQfWveCEhJ/g5rCHXwLTb93QiwLaEwRWmHI7iyRrp1MEUr/k+dsHBWMjTH1pWlfHSbDTtu+yRGrQF6Ag4xlpK1XEFwyAFGOx6BM8US2C9onBFO5+fegknZq0DB21hPdffQ70aF2vmqhQJZSJTk+NTo= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0a5990b9-3b86-4ea4-b68c-08dc482508c2 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:58:28.0948 (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: zNDKnnwITn3Ij0EwUmVdXADVnog+RFeSMbC4DQrwt3TndG6btBz+4/kicZ1jA+5RKidRs6M8Aqqjk2gtRhLtWg== 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 adultscore=0 suspectscore=0 malwarescore=0 spamscore=0 mlxscore=0 phishscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2403140000 definitions=main-2403190114 X-Proofpoint-ORIG-GUID: 8Ux-54ia3RdMSz-lty4ZYxiw07qz0kpi X-Proofpoint-GUID: 8Ux-54ia3RdMSz-lty4ZYxiw07qz0kpi Rename ret to ret2 compile and then err to ret. Also, new ret2 is found to be localized within the 'if (trans)' statement, so move its declaration there. Signed-off-by: Anand Jain --- fs/btrfs/qgroup.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c index 23a08910fa67..3ba4c4ddb627 100644 --- a/fs/btrfs/qgroup.c +++ b/fs/btrfs/qgroup.c @@ -3709,8 +3709,7 @@ static void btrfs_qgroup_rescan_worker(struct btrfs_work *work) qgroup_rescan_work); struct btrfs_path *path; struct btrfs_trans_handle *trans = NULL; - int err = -ENOMEM; - int ret = 0; + int ret = -ENOMEM; bool stopped = false; bool did_leaf_rescans = false; @@ -3727,18 +3726,18 @@ static void btrfs_qgroup_rescan_worker(struct btrfs_work *work) path->search_commit_root = 1; path->skip_locking = 1; - err = 0; - while (!err && !(stopped = rescan_should_stop(fs_info))) { + ret = 0; + while (!ret && !(stopped = rescan_should_stop(fs_info))) { trans = btrfs_start_transaction(fs_info->fs_root, 0); if (IS_ERR(trans)) { - err = PTR_ERR(trans); + ret = PTR_ERR(trans); break; } - err = qgroup_rescan_leaf(trans, path); + ret = qgroup_rescan_leaf(trans, path); did_leaf_rescans = true; - if (err > 0) + if (ret > 0) btrfs_commit_transaction(trans); else btrfs_end_transaction(trans); @@ -3748,10 +3747,10 @@ static void btrfs_qgroup_rescan_worker(struct btrfs_work *work) btrfs_free_path(path); mutex_lock(&fs_info->qgroup_rescan_lock); - if (err > 0 && + if (ret > 0 && fs_info->qgroup_flags & BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT) { fs_info->qgroup_flags &= ~BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT; - } else if (err < 0 || stopped) { + } else if (ret < 0 || stopped) { fs_info->qgroup_flags |= BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT; } mutex_unlock(&fs_info->qgroup_rescan_lock); @@ -3766,11 +3765,11 @@ static void btrfs_qgroup_rescan_worker(struct btrfs_work *work) if (did_leaf_rescans) { trans = btrfs_start_transaction(fs_info->quota_root, 1); if (IS_ERR(trans)) { - err = PTR_ERR(trans); + ret = PTR_ERR(trans); trans = NULL; btrfs_err(fs_info, "fail to start transaction for status update: %d", - err); + ret); } } else { trans = NULL; @@ -3781,11 +3780,12 @@ static void btrfs_qgroup_rescan_worker(struct btrfs_work *work) fs_info->qgroup_flags & BTRFS_QGROUP_RUNTIME_FLAG_CANCEL_RESCAN) fs_info->qgroup_flags &= ~BTRFS_QGROUP_STATUS_FLAG_RESCAN; if (trans) { - ret = update_qgroup_status_item(trans); - if (ret < 0) { - err = ret; + int ret2 = update_qgroup_status_item(trans); + + if (ret2 < 0) { + ret = ret2; btrfs_err(fs_info, "fail to update qgroup status: %d", - err); + ret); } } fs_info->qgroup_rescan_running = false; @@ -3802,11 +3802,11 @@ static void btrfs_qgroup_rescan_worker(struct btrfs_work *work) btrfs_info(fs_info, "qgroup scan paused"); } else if (fs_info->qgroup_flags & BTRFS_QGROUP_RUNTIME_FLAG_CANCEL_RESCAN) { btrfs_info(fs_info, "qgroup scan cancelled"); - } else if (err >= 0) { + } else if (ret >= 0) { btrfs_info(fs_info, "qgroup scan completed%s", - err > 0 ? " (inconsistency flag cleared)" : ""); + ret > 0 ? " (inconsistency flag cleared)" : ""); } else { - btrfs_err(fs_info, "qgroup scan failed with %d", err); + btrfs_err(fs_info, "qgroup scan failed with %d", ret); } } From patchwork Tue Mar 19 14:55:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13596754 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 0531854FA0 for ; Tue, 19 Mar 2024 14:58:39 +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=1710860321; cv=fail; b=r8JUpPRl7I3iOVR8UVuZbl5j1n0elagK4lvzkwx1bHyIqOBDRi/kGtX7H/puXbBCTqlvTk3YPF8EMjjbmH81QoJdh83C9u8N10yuBBMi3cymuSoYjICp3SrL68qYIk5Kt3+08ULz07eqwwcCGyyGmizLGuVUa1ixnf2wi0RaZI0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860321; c=relaxed/simple; bh=G57TnWmGKQ+N4auwkjbvekmQGDl6sNqIu+z1vvwJxfo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=C0hRtVW5V8DWUVrK8c4LOhLAsCgKMdUSkGK5hFiKtfA+mawMaRWJf/WaFgl7nNcp3+LXwHKjxKEkk/x6Y5lN+AoCyXWCxxyF8mFVqBK0wgYcet7zbTVy8V+lVD9XmcrRKeXPHAYY86PMgZ+oon8L76PYYit4wJHclGtFb0HnqfM= 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=AD+g7d7k; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=cJySF6mm; 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="AD+g7d7k"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="cJySF6mm" Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 42JAHtB9010428 for ; Tue, 19 Mar 2024 14:58:39 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=Dba3Md79KwY0Wvn0RdnB+Sk7m41HLUmGpeQwsOrab8c=; b=AD+g7d7kS4biS4c263MFiT7ukincnbxGLD0feChZpkxRcwmLndHzJO5f2BZbSdd9FLuU ecw4Bz33TzhmVskKvTfygu7hhFcM7w4dw40tVqimhgdcO4kSbk0preEU+gLaeNip/nvK 3nHieAZSH38iyhFddAfKVFbNW0t8Q83kcxF4HKMzb1WHGoM1xHAAx/Ul6IPVdTAGzqjq ukoxRmJMGtt0Mhg+W1nj+M8QcOlHEvbcaY9n+RtkMzsbjqxd9hZPfTb6gfCm6i4qSSnb GhC0GCFpoNyC4FHS0IRpHVevf5BDzJ5a0zSlXAoUnSyEdYd8RX12zHFVGNf0lxUgIPTf Jg== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ww3yu5m0x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:58:39 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 42JEXPWt003788 for ; Tue, 19 Mar 2024 14:58:37 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2100.outbound.protection.outlook.com [104.47.55.100]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ww1v6c9gt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:58:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DIXAZYKF34itk72ocb8V71kX+EbmWuFhjc4iWi39NerULZEHM8JtkbndjY14f3Ld/6dwFfv/8JcsgBl9eiNgjze1XwekynJQ1xuhwjRI6jHGvtY27sIv6Rj3xLlBfbokX+oLIwVFCkifuZRnLoE0mLBjY7Q93ZcOvJyxIC9fqkwTrb88XpezM6rklnwW4+1vn8kMosqMhuy4Lde42WhM5r//WQvE+iVx+8khJLTmxTrYhbKQ4mF/jcwTR6UHncR4jkazkLSQiPPjMCb8Ciy+A1jVWewjW+5hnwKg8GolK22yHEKx+oDXLbKNEO1ZI3saaDebiRkQ5YqvXxEFm2bvCg== 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=Dba3Md79KwY0Wvn0RdnB+Sk7m41HLUmGpeQwsOrab8c=; b=aU4wTEK2FMu8q6ijs1sUfuoLh11nmpbViz8xhioc6vScAf8dz69sAn5QRgFVAVjCFdVEwkITl0JKtXDTonqXDaPGJ+Jwz8LFBzycdsehmtHAWeOIVdp9ipn6Jv/NW+elG7zRFKvMpxBltnXDbajLT98/zkcwgN/ma0SFJojKR6PyxqDVRVbjovzCqhRbgZBSeN5uLn0dQEiFvQpLajIjG4hj4dccowRYvucRiQwZwYnKupZImoWyp/S5ASGPvkRAYhA3469Kxk8nujDtp9Vh7pAl8gUcwPYu4n466i8J7AHkFcSBEFV9hRWU+g/gSFHVcmBZIa4c5smSbQpiPpnHmg== 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=Dba3Md79KwY0Wvn0RdnB+Sk7m41HLUmGpeQwsOrab8c=; b=cJySF6mmHVd0fQldUc8hsYmNWOtXZ4hMZ5ETqpRMaWW4puInvMRmpkoTxBWKS29Ktvjtg48MxkVNkfUOuOcEnzzIWuBatbTvWm5O1vbnK1OdFmKs7zQ5JBTlP8ZrARDbfJQkuX9c5ymNVSOLG33iDY6lg9d5Yl0PJGJiFTv8XNY= Received: from PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) by CH3PR10MB7460.namprd10.prod.outlook.com (2603:10b6:610:15e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.28; Tue, 19 Mar 2024 14:58:34 +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:58:34 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 23/29] btrfs: lookup_extent_data_ref rename ret to ret2 and err to ret Date: Tue, 19 Mar 2024 20:25:31 +0530 Message-ID: <3dacbcffa8d7c4e70e934b8b977676a1072878f4.1710857863.git.anand.jain@oracle.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: References: X-ClientProxiedBy: MA0PR01CA0034.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a01:81::8) 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_|CH3PR10MB7460:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pEiENrKwqfVkFd108MvVU5UBBYUZgs3LEVk6fpMWA94o2Wl0chMTcrA579uBpk7JK6Z33rvgA2V5ZDb6SCoKelFcoK5uiSMWcKjEKrESALvSRqKXglUDK+Pn39NbDwD1Pzle8G4BCWOWd5fLDtAaVhhg+xHvSQUx9uA5oUKDPUnps4MLCwYF9PSgthuYbnGsk/KXfUlMijLvZrCU4lYl2S+4/cS3OKG6qupvJgjV7ozZNEGHt18XhQYddY/rjVFJI3CdCsMN3DWBTMuwo38NXdLV1q+HqK56k2lo2f7YfxjKVPWnKHbf5IdO+09OqOfIzyc+UnCGf/eR6dksAeDSiTDnMIUpH6g0EoTMmfYOd9fOKxBo5SjNw2LTgpDv+LWiiy/LnGAEbTAVZViJFKDYNIXMrsHZytNMdU3Zf2zWqgvZvMRIEO6rZIolzi16ElnFHIsaErmQ8QJzTvzWCIFCVLM8jsLD8OTm7fFPNqwbcPks2nXXAU/fuOcih0XCvuVumRnswh0IdbVhMwFpjJHo4diRJir6bwSHHhrCvvR8vvas5hlbEWcJQ4NIZYWglgoXWCODjrOOFw80Z4RFcMmzJGmCLiFwAGuAxV4meikhSJrBR6ewJMopHEtfi3raUDVfq0A1D4/+i9NPl3YJOCaEnQ== 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)(1800799015)(376005)(366007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 0B2P20jhTPbPlWSFhRC+Dnz6fZsLw6C21ZQ4IyNrhSDcV5zilSUzD2FcjCqzEg8Uu7gvsk3MCTjbILaM+x2fJBYuVcygakRKDFTPHVPOLiLV7mxxMh7vNuazk+wgVuXGmXCIEXU/ZfJF9MdJq/51w4yzmza1gbxsz0OtCgDKxKYTnu1YYXtdIhqPIG4SbjGDqjREm1KmyToueVXbjNovVjmYKhV3aaIO5c3ttsgKBjygYAPDIA2fz4/W5dpDVB88hxsXNSOx6BG3UnNBFG4/pNMlHlifK/CI5TUW+qrGTQ3/P+J87LzToFWaVSXPE3qi2VQJVOwiKZeBGg/30bDEg2JPyvphQ8vWGqgpU+2+iECAaL8s/bmPhchh4XMJz257YpLibYXtQhKgu2R261XmM84waysU5EunFSoG014KItmQ1E4AQCE76W1OTK3hK/16RDVupsxJz3Q0ck1NswqpHT5KmKuOHVaNjl1nTdg9mlNCIpaUp2c0c/aa3p4rPVDnmkHC46OiKBh66+Ph0N/GjdG43kVUZZdDm0t9aTNho704QbN03habil4J1hC9Gv/8Ua/HC18mHCw1KqMPyeEsVHn+Ii2cKrRgl78VYD1V0Qe7832DBS8n69bereJBAbdIVHQUvuX42+dim0nwhxkRwFAGjhyunSz1ahzPoyXY5otc4gr/C7CYKpiryx6h+cGIOuxkO/Psksa70j7uNXcKD4TETMCYunNEIjKMMxB+kZGTeA1kwzNIOItpaHyOBHBaJzXD5UtsSC7jGE87WBY3uICjDML8efDnPq4avxWS2e9WXIZuIw2XTqFltfHQ3k5Iww+hpZldjX0C71L8M3AlrtO1pldXNLs32/C0NGYSM+o6OzG4e35V9GBkl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wiqtsRv9+ovCNkuInZSYqq8ju1IuWusT1sWm0ilspCxXcf/vf3i+Qv1qHXAjM8amwzQO07IHeBpG7k66HU51MYJlhYlOW9zT69KB8HnprUZLH2ovNs1+VlYPeaZpZIYce+xG/m+BhxMhzPkBPmmIJCvdNnrb49wu/mYvLRwRvwtz7iMEUgj+foWEBxw/0wZPL6ZZ1ziH+EUX+oDl0Q5Fs7BD2ttyyKuLrgMWNdLh19yhn+nQPTM8FBpB5WGDBPHmwYou/k6WBQXT2Jj36vc7onFgg8IUjsrjZGhf+BROKOy+GFcQhWx3PvLMGzF6AKCXm4znSV0paTJk7qF0J8w+e+1y8AIV65MJro8kvuMadmm5K9lW59NFukZOcxcXudg+Uc= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: f3b65710-1a4a-4188-21b4-08dc48250c5a 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:58:34.1268 (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: thbRNytwqX5k7eAvhL0JzaPSqh4E3MSaOtKbYQFUbauJt9uIHK4giT8mK0RWodgkOGF9DNSEURlDYtdJ/0MD2Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR10MB7460 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 mlxscore=0 adultscore=0 spamscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2403140000 definitions=main-2403190114 X-Proofpoint-GUID: 9DCi-ohp3qi0t-BTc7K4vmBxLLYTojNF X-Proofpoint-ORIG-GUID: 9DCi-ohp3qi0t-BTc7K4vmBxLLYTojNF First, rename ret to ret2, compile, and then rename err to 'ret', to ensure that no original ret remains as the new ret. Signed-off-by: Anand Jain --- fs/btrfs/extent-tree.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 1a1191efe59e..4b0a55e66a55 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -448,9 +448,9 @@ static noinline int lookup_extent_data_ref(struct btrfs_trans_handle *trans, struct btrfs_extent_data_ref *ref; struct extent_buffer *leaf; u32 nritems; - int ret; + int ret2; int recow; - int err = -ENOENT; + int ret = -ENOENT; key.objectid = bytenr; if (parent) { @@ -463,14 +463,14 @@ static noinline int lookup_extent_data_ref(struct btrfs_trans_handle *trans, } again: recow = 0; - ret = btrfs_search_slot(trans, root, &key, path, -1, 1); - if (ret < 0) { - err = ret; + ret2 = btrfs_search_slot(trans, root, &key, path, -1, 1); + if (ret2 < 0) { + ret = ret2; goto fail; } if (parent) { - if (!ret) + if (!ret2) return 0; goto fail; } @@ -479,10 +479,10 @@ static noinline int lookup_extent_data_ref(struct btrfs_trans_handle *trans, nritems = btrfs_header_nritems(leaf); while (1) { if (path->slots[0] >= nritems) { - ret = btrfs_next_leaf(root, path); - if (ret < 0) - err = ret; - if (ret) + ret2 = btrfs_next_leaf(root, path); + if (ret2 < 0) + ret = ret2; + if (ret2) goto fail; leaf = path->nodes[0]; @@ -504,13 +504,13 @@ static noinline int lookup_extent_data_ref(struct btrfs_trans_handle *trans, btrfs_release_path(path); goto again; } - err = 0; + ret = 0; break; } path->slots[0]++; } fail: - return err; + return ret; } static noinline int insert_extent_data_ref(struct btrfs_trans_handle *trans, From patchwork Tue Mar 19 14:55:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13596755 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.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 58EE054FA0 for ; Tue, 19 Mar 2024 14:58:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860325; cv=fail; b=e8lGVmbuZO09LqWR6O3I3Qp7kWXJ7/MyaTjr2aGZflE5UZpYoTDzAVi7N/AMSD6mYtLXWRT8DWeeS277OyV/thOfOLymfU3hCyJAr+lYJ4mic7fv2fmdmS49fQD1RWgNZHRWnPF3FXhuFh+6xpE1ZBOgpX4UmIT1oCUQoklueCE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860325; c=relaxed/simple; bh=9raEGbDnxJqlpK4II+/APpl8gkaXlKtCTTiGTXKptsw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=ncb7Zw/X72FSTp+wyZxZdifan+XD8egC/ueR2v9po68Q1U2RZEeJw47buqV2L+AzJqTPnkPMeAlt/vvCsksM9mT+4daX5dcbL+e/PkKrRs4kiIIv8t1f8/T3BLj7LT/soxrugvPZwbkDJOzFWdq4UseYo0Fvu1eMMWhD8DDH8Jg= 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=Z9KA7b7W; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=OqNRvZgs; arc=fail smtp.client-ip=205.220.177.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="Z9KA7b7W"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="OqNRvZgs" Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 42JAIRSY020311 for ; Tue, 19 Mar 2024 14:58:42 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=+IlvqLTU/TLUGLbQ7s41P14gSv/EbT1WGTpK8ySRi2E=; b=Z9KA7b7Wm6XC3JklY0bfy89HJL4yx2cosTx/D4nbnebuLpcQ1hHTbYwaYHeXayN8YoEo 3HCdDQSTxKrB726fhC6FZXwDdAzX+Iqs4XtANN4bV5DlWVSNT8omoIn9nGc6htpq7C4i 2b4Gs+YInpAYT1cuh+a+NZbK8vgnM5k7VLRiFd2Kp9D31JGag6o7WKt39Whu9xMcA+EX vUAUKd9CbkzRnT+pKjlVkrCc8tTso/7U6c8rMoGSScqAeF+zCjDm5kKG/820YM58IkgG VJ+CZKDEeajv8+Ihw4aqp9p2CvO2eeDasyP4orTYvtCaNtDD4029kvFr2oCd/vZrP2Bx 2g== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ww3fcntng-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:58:42 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 42JDfGgv024264 for ; Tue, 19 Mar 2024 14:58:41 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2101.outbound.protection.outlook.com [104.47.55.101]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ww1v6mt37-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:58:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PVoE4r7airQuU60Ar3rM6xLUY7xYM++CaBORMoSPGnSAZz2Hmdr1fr7kXJy4ZQ1VFBXMduDZfsimKL16iru6o+PSk3+m5A/VoBIqy0xYVDJoAMinP8BN9DCJW/izNdYaUrF/+lfs4Un2z3OLLIsE3SljG/1W5T/Tj/VCc+tCe7YegxAMOSc19IrEseVdPRF/51HK8G+Ey9zrulYuTcQagsQMxAkCfW9LIw03yZltxpUDglM1b7MULCmNaKtNHem/aa6VMP15IMWXmiAWs7YsVsYqPlGbt1uN3L+g4mJgWaWHat3VkTMgq38GtiX70YKEQAEVXduEmuK+ERf3OudIBA== 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=+IlvqLTU/TLUGLbQ7s41P14gSv/EbT1WGTpK8ySRi2E=; b=Jqrk+ueo8BmcH2vXcDqnPzrPSARH1vddkxUsk/es0+PJZXFZm0hGSZ2uZFIUETiwdSkCCDWYVbL4IzjeUME/2AnL/RN/7q0bD6Yb1oh9US8ySdhbfo03zwOBVMCSWUAj4sfpi01pko4cfwdwjcsp5xsVKMV0sGS31kXlHle55vz0m4ZHGCcZjVl1+CF+hr3qEuW4UNxKlq+e10MPsyavXIoR7gtX8nQPheqYkSEYfDJ/96Foh+Ah9BFcmRcPeagwXsEj+LusQ3sZtXM4iaSi2EgxKIwEj+vXczjJtUoQUr3JjV1HPPh6Tx8uyftmiIrbvYuvCNABOANCMWcbkpefiw== 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=+IlvqLTU/TLUGLbQ7s41P14gSv/EbT1WGTpK8ySRi2E=; b=OqNRvZgsaYTDUOlLupz3LSle38P5vvLDCKqoUiKSjwiwmonelX2+Mf/QZN08VQNqdH1Tcg3148Wn+INjgS2aJRf9kC2KKXOcEYzPgrwEKbtTnIDb2fMmcqlOs9XPTvMOOqRei94xFYgorBCFKjQS7dpLCHNBeBuytZojSUrAEm8= Received: from PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) by CH3PR10MB7460.namprd10.prod.outlook.com (2603:10b6:610:15e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.28; Tue, 19 Mar 2024 14:58:39 +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:58:39 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 24/29] btrfs: btrfs_drop_snapshot rename ret to ret2 and err to ret Date: Tue, 19 Mar 2024 20:25:32 +0530 Message-ID: X-Mailer: git-send-email 2.42.0 In-Reply-To: References: X-ClientProxiedBy: MA0PR01CA0065.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a01:ad::9) 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_|CH3PR10MB7460:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: r3zWrq6UUoAH9UGUapKM38//2FO2sUPheQNkHhfLyMxLVm7xNq0914pxm/S0Z90Tun5dF8P/PG0EyTcMWfoUDrnE2XMa0t4oPd/Kt/pkHwz5ph9G35Ky61ZR522ykuvIh2ZBNh2V62IbL5eyeVkYSeo59izi1XYh0rg7sOTPKKECek+0YSfFe8uBqLWVAa6IYFdLm2ARTgwLNwUhBhIthbqGiBEGfp7UJ4K2Rs+L6cecAMNkGoClYSqlIJn1Vsh4b3BOjnD4qdlppDMBZ++RgSczwfmCNxyr8Dk0EtcLfN3gIBRH6k2XepLLqvpqin+/rdutw9yzSMlcDW3vCOuQqfqGX8lSYotkpiSUsddj1xOU6TaKmol/I/oACaIlG1cEnEjPNnJhBmsGRrXnuGR8cS73ijRTeuA4+M4VylGAQlNM4QjUkJjDQXRUNX/Ea0r9vWdnFk03n9AT1ixqDj3p0beEv+c1/orOyWDBPJQtTFicnSBSKfHaCycXufIS+QEFrhxkcIQsAbQz+dGLXEQNQgSOcr1LGs0xmE3R4LWnI+krJXSXlkmmQRhqQPvi2rmtrQKPzuxWPyjgdVo7TYWTX++Bx5w2uzqyCW6/XgLCtRSGgNJ53oCWG8HhNgCw50bsUK05rlxR8BoDZpldoB862mOhp2gbfnq9ZcwI8Qs7J7Q= 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)(1800799015)(376005)(366007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 8HLkI/h8YqvJR8mK9vgPY8A/u62HZZg8ncYZ89wMRNNL6qmCt0nmlk6OTejDgrglELxjtdHc7uLrsIAYK+LW1GRxgVlWPTmBNwDPvmDoT8IyScslnhCl/lKxToKNFpQjoP56erJDlvxSoFZ35NQMTudfvXqgoxq4+EWiZY/3eUhRmU2I2qVG7XWfDLnOpJlWtKb6Blsa33/RlC9k4MnSSu3A9oHfdhLoks8AQ97EQuxpXicrEuhB2qUUfR9swnmFNabk3Ztz0T8ustWstANhRqgwdWNUoeAc0MRi22TzMO46StMMGOMd8n5qjYp/F3rCXECstJOLj7PhzSQVdSJ6zJ0t4RB98Qwc21e0dgSfbUTQLQEcMUlfvkDy68Z5eKXuBcmWTVZhnfuTeJFqfeqysw0jJG4dTZzCPx8P5+n770lELOMHvzhujyEvIPNP8o+r1YXLuH5p1CjZy79JCKpcuw74csZCt+SPGDhstbxa0olfr/ZtDG1eP2tegCKvoZbcD4UEyqsUxU6dxZ4zwZ+kwNbsqCYHOkC7M3eubh/rP/wiezoJ7TU11wVQC/dUzkFpjJaxlBS/83XlAXEZSvG4AWkt2JQYeZuHhdPotZCiQpSRgNkbhGtIGlpdlYOp1z9GAMPDzSEDEGkVbOHPpt643ppNDUiqSJdhKM0xxWZtE1hDgSKwAwexaYBHFXxerZygnNtT94CVI0tt2LuoSkauP2i/3Hgz0LjNIvHl29RM55pCMEIbNafuLipE2VnZLOTofbVM8U0rv3mWkagPV3sz45Sqf2U6S6ufao0oNBytYagHwFxCZX9Wt1HYD32ypl183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cXPRGEY+uy6rwc4YGSRtugHYgkTeR2Qs4Gdvn1KjuKVNZL2fTF8StxgPwCPMiieucVo6KRafahPlUGxfWSzTXf6KYM/tT1uS1Gd29HrLkQFeR+ZWAAicU7LUdkqcUiNq8gGHBFaRbhyqt41buBMR1IO1q9/pSYuTzEZ9ncAlpOlykFDgo4j8n4wWdSA+FlQweOp2/XjYM/JqD0I39CeMODysWdArF/tilJcSoEYWmPvJBP9kmdoTLeDV3Mq2L/vhOr3/O7JTUrPYYzB8axE2IGBWq5WD238p44HTkzffZLULxFQTB2kGDMHZ2AuNnM9+RAY8ScOe7OCJOp9+TKc8tzdUwmFlreXtYIC1A3k7stzE2LAIZ4AHqnuka758fDJaCguxxxkT8CGgZV5lMSI8p0CQNw1heKfnCA7dOJ4Gtpvl2TgX6ksue0DyX4ylvzXHi9w2bS8= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 095cab5a-fd83-4a45-d934-08dc48250f45 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:58:39.0126 (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: Hvjko36UmvaqYsmFAw86PBCmMYXWqPzK3Cq+lwJ6x6NF427BRAJBISZmfg+mGlwSb+I4tpprQpEOD3MmKdCKlg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR10MB7460 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 bulkscore=0 mlxlogscore=999 phishscore=0 malwarescore=0 mlxscore=0 spamscore=0 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2403140000 definitions=main-2403190114 X-Proofpoint-GUID: XfWOI02DY80UUboQ3zQ5jteiz4R7HQyZ X-Proofpoint-ORIG-GUID: XfWOI02DY80UUboQ3zQ5jteiz4R7HQyZ To fix code style for the return variable, first rename ret to ret2 comopile and then rename err to ret. Signed-off-by: Anand Jain --- fs/btrfs/extent-tree.c | 82 +++++++++++++++++++++--------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 4b0a55e66a55..acea2a7be4e5 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -5858,8 +5858,8 @@ int btrfs_drop_snapshot(struct btrfs_root *root, int update_ref, int for_reloc) struct btrfs_root_item *root_item = &root->root_item; struct walk_control *wc; struct btrfs_key key; - int err = 0; - int ret; + int ret = 0; + int ret2; int level; bool root_dropped = false; bool unfinished_drop = false; @@ -5868,14 +5868,14 @@ int btrfs_drop_snapshot(struct btrfs_root *root, int update_ref, int for_reloc) path = btrfs_alloc_path(); if (!path) { - err = -ENOMEM; + ret = -ENOMEM; goto out; } wc = kzalloc(sizeof(*wc), GFP_NOFS); if (!wc) { btrfs_free_path(path); - err = -ENOMEM; + ret = -ENOMEM; goto out; } @@ -5888,12 +5888,12 @@ int btrfs_drop_snapshot(struct btrfs_root *root, int update_ref, int for_reloc) else trans = btrfs_start_transaction(tree_root, 0); if (IS_ERR(trans)) { - err = PTR_ERR(trans); + ret = PTR_ERR(trans); goto out_free; } - err = btrfs_run_delayed_items(trans); - if (err) + ret = btrfs_run_delayed_items(trans); + if (ret) goto out_end_trans; /* @@ -5922,13 +5922,13 @@ int btrfs_drop_snapshot(struct btrfs_root *root, int update_ref, int for_reloc) level = btrfs_root_drop_level(root_item); BUG_ON(level == 0); path->lowest_level = level; - ret = btrfs_search_slot(NULL, root, &key, path, 0, 0); + ret2 = btrfs_search_slot(NULL, root, &key, path, 0, 0); path->lowest_level = 0; - if (ret < 0) { - err = ret; + if (ret2 < 0) { + ret = ret2; goto out_end_trans; } - WARN_ON(ret > 0); + WARN_ON(ret2 > 0); /* * unlock our path, this is safe because only this @@ -5941,12 +5941,12 @@ int btrfs_drop_snapshot(struct btrfs_root *root, int update_ref, int for_reloc) btrfs_tree_lock(path->nodes[level]); path->locks[level] = BTRFS_WRITE_LOCK; - ret = btrfs_lookup_extent_info(trans, fs_info, + ret2 = btrfs_lookup_extent_info(trans, fs_info, path->nodes[level]->start, level, 1, &wc->refs[level], &wc->flags[level], NULL); - if (ret < 0) { - err = ret; + if (ret2 < 0) { + ret = ret2; goto out_end_trans; } BUG_ON(wc->refs[level] == 0); @@ -5971,21 +5971,21 @@ int btrfs_drop_snapshot(struct btrfs_root *root, int update_ref, int for_reloc) while (1) { - ret = walk_down_tree(trans, root, path, wc); - if (ret < 0) { - btrfs_abort_transaction(trans, ret); - err = ret; + ret2 = walk_down_tree(trans, root, path, wc); + if (ret2 < 0) { + btrfs_abort_transaction(trans, ret2); + ret = ret2; break; } - ret = walk_up_tree(trans, root, path, wc, BTRFS_MAX_LEVEL); - if (ret < 0) { - btrfs_abort_transaction(trans, ret); - err = ret; + ret2 = walk_up_tree(trans, root, path, wc, BTRFS_MAX_LEVEL); + if (ret2 < 0) { + btrfs_abort_transaction(trans, ret2); + ret = ret2; break; } - if (ret > 0) { + if (ret2 > 0) { BUG_ON(wc->stage != DROP_REFERENCE); break; } @@ -6003,12 +6003,12 @@ int btrfs_drop_snapshot(struct btrfs_root *root, int update_ref, int for_reloc) BUG_ON(wc->level == 0); if (btrfs_should_end_transaction(trans) || (!for_reloc && btrfs_need_cleaner_sleep(fs_info))) { - ret = btrfs_update_root(trans, tree_root, + ret2 = btrfs_update_root(trans, tree_root, &root->root_key, root_item); - if (ret) { - btrfs_abort_transaction(trans, ret); - err = ret; + if (ret2) { + btrfs_abort_transaction(trans, ret2); + ret = ret2; goto out_end_trans; } @@ -6019,7 +6019,7 @@ int btrfs_drop_snapshot(struct btrfs_root *root, int update_ref, int for_reloc) if (!for_reloc && btrfs_need_cleaner_sleep(fs_info)) { btrfs_debug(fs_info, "drop snapshot early exit"); - err = -EAGAIN; + ret = -EAGAIN; goto out_free; } @@ -6033,30 +6033,30 @@ int btrfs_drop_snapshot(struct btrfs_root *root, int update_ref, int for_reloc) else trans = btrfs_start_transaction(tree_root, 0); if (IS_ERR(trans)) { - err = PTR_ERR(trans); + ret = PTR_ERR(trans); goto out_free; } } } btrfs_release_path(path); - if (err) + if (ret) goto out_end_trans; - ret = btrfs_del_root(trans, &root->root_key); - if (ret) { - btrfs_abort_transaction(trans, ret); - err = ret; + ret2 = btrfs_del_root(trans, &root->root_key); + if (ret2) { + btrfs_abort_transaction(trans, ret2); + ret = ret2; goto out_end_trans; } if (!is_reloc_root) { - ret = btrfs_find_root(tree_root, &root->root_key, path, + ret2 = btrfs_find_root(tree_root, &root->root_key, path, NULL, NULL); - if (ret < 0) { - btrfs_abort_transaction(trans, ret); - err = ret; + if (ret2 < 0) { + btrfs_abort_transaction(trans, ret2); + ret = ret2; goto out_end_trans; - } else if (ret > 0) { + } else if (ret2 > 0) { /* if we fail to delete the orphan item this time * around, it'll get picked up the next time. * @@ -6093,7 +6093,7 @@ int btrfs_drop_snapshot(struct btrfs_root *root, int update_ref, int for_reloc) * We were an unfinished drop root, check to see if there are any * pending, and if not clear and wake up any waiters. */ - if (!err && unfinished_drop) + if (!ret && unfinished_drop) btrfs_maybe_wake_unfinished_drop(fs_info); /* @@ -6105,7 +6105,7 @@ int btrfs_drop_snapshot(struct btrfs_root *root, int update_ref, int for_reloc) */ if (!for_reloc && !root_dropped) btrfs_add_dead_root(root); - return err; + return ret; } /* From patchwork Tue Mar 19 14:55:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13596756 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.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 2F54B54FA0 for ; Tue, 19 Mar 2024 14:58:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860336; cv=fail; b=jfY6kTBTt63qIhH4NKMSqUiweQNiOuVepI5WMMpxMEiiptzi6F0WZ969puYIBBj+dpGVdhoO1+XO9YS7NvDuQ/I/pV0TvbpES2/kBVKQza5AQCWXL7s2WfxA6CWnQl5LQe9JdPcIQgbS18Pl99uObJc8LLQ99+AaH4X+WEMTbkg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860336; c=relaxed/simple; bh=zm9lxhsdLqCFeS1Fp8jnt2ResFzbdGmpfUCtfxnkTIw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=oVbsUNmPJzjjJjqOWBcDdoZV94K4pfF4vWD4x0stNayCaNqGVWuO1ttdbIqXRlQuwO2KuKd2sWmgVoE1t5XhOaoOJYRlEsP8SVag2LadXVF8NtBhgR0VzhMvTKucFYy+mRQ/w3jrZgKo4HyFYKRgclY4vOu5eOtiY8NeslzwDhg= 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=Ur0CXXiu; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=QQWi/Ktw; arc=fail smtp.client-ip=205.220.177.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="Ur0CXXiu"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="QQWi/Ktw" Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 42JAHe7N026503 for ; Tue, 19 Mar 2024 14:58:54 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=pXJ3VQ7E6YApFd6CN3I3i4NKT14icR2l0ggMHHsPI8g=; b=Ur0CXXiuk4Nt88+IUx6zKYcT5Qx4ZWeEqa2HgWm9rFNUdEbgHR7wnGOFtMwTJKyCkajD MgBv3CEJOfeZQiqDrA6D8hT5jjKqnhYlfTLkMJsVC9WFjlgnvXSnG9qdBgKZ4XY0op0P E8SZv082ID+kCHTsCdPvzD85Ivg/Rf2lY5e+eGBoEPAW647zPvEOJMFTJlZGvp3tnEoP DQDOsbv5CQS2kY2dwgGZ4Eq9wL/XhPMQACi8JdfUg22Eprr1ug6rYOwssB7dEpAvEHDZ 7UACSxIWfFLVgezLHDcP6x6mckcHGn/GwxwQtvplE2MKgK4hTScmfnl4CubSa6eyk0L2 ww== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ww272wtxe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:58:53 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 42JDfb9T024194 for ; Tue, 19 Mar 2024 14:58:47 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2101.outbound.protection.outlook.com [104.47.55.101]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ww1v6mt9d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:58:47 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AV3WKUleQ96h5BcIXnrXh/KMiGluzL/pcMQ3bYHFdcG5eccUtpqfVMEdSYMDkTwMck5TqCa9dzXtkpqOAo6tg6N/IxkI7WzvMxkI9rQZxJJxwLEdQ0KB/StacRf9+GgtQrJ12uAV5T2T8gn76ohlZQrEps8QXfROwwotuoxiQIvT9/8nS6tved6CpsceM5bWENAsyd3XJ5FPaPxuNkZ1chzHN4NnwOORr+enhy3NS+/9cYQOY70LRJNAjMxQ3LP44U9ggDRgNwrq0AiMOkDxWYjoaogGcVSlfQUN+8pk+w4+mZtkCdWx81HYs5HVwKVgbatZPMMJ3IIun/cks/3Q0Q== 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=pXJ3VQ7E6YApFd6CN3I3i4NKT14icR2l0ggMHHsPI8g=; b=XsSYwqDmUTDa9je6+rmRUyBUcVpvLQsm3p0HHmtQEe/Ey6381imGGcZys5m17/ZI5xatFrEblo21JB+xG1QO+KYedi0UFO22XPizN9WXwm0wH7hBA31F37cBzB6usUVnrgQMz8PO3CQY+YMtRdY0T1ztzvAd7Jm4RFyyij3fixmcLILalFMC/SLslDWGYTbh3mxbQ4m8nspascACWzK6St5t3LbyApxKkbhM514+DHYFsMFbPpIHPgna9eUMnvujoHJTz3u0H20SFKoDo1/ZqsZZ7LAZ9rQK6gf9yfwOpaNehe+5FQ/aAKo1GOusNYr2eKij3R+ISZgHMEf+YezxiQ== 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=pXJ3VQ7E6YApFd6CN3I3i4NKT14icR2l0ggMHHsPI8g=; b=QQWi/Ktw2QbmZcoBKaTfu2rsmWHvSJxno1gqUtFP2Lj9m3LVl5MgySHqH0I339Ep7BOYw3BkaQQDiZqCZZmy7YXTRZC6HEbQLX83YXtONTUqYDj2KNSSBC5lMENqv9wOjCTQyCzyWag5B6t+k/Sp/1NEx/voTADrTjW4V9UDk6c= Received: from PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) by CH3PR10MB7460.namprd10.prod.outlook.com (2603:10b6:610:15e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.28; Tue, 19 Mar 2024 14:58:45 +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:58:45 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 25/29] btrfs: btrfs_drop_subtree rename retw to ret2 Date: Tue, 19 Mar 2024 20:25:33 +0530 Message-ID: X-Mailer: git-send-email 2.42.0 In-Reply-To: References: X-ClientProxiedBy: PN2PR01CA0174.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:26::29) 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_|CH3PR10MB7460:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bsJMI5JFWbLTF7fbpIjX6AmVnGGkrEHZ3RVQoAD44SNqWbP2uvTvwI8KEwmvki7Xu+5tiV6kwT7ZkLKtDfkbWNZ7nGFRG0RZ0ADO3SgW3HkAa7mttj8qGesMNDRBHx9EOATRrIWAyBzVjhVMqK73if4C6PObmGdP+0tiaQQufSoaEHFqzUuZ4VjiBFECA0iclnMbjybJkezoE5xlSe3YsVbsEezhcvDmuztWK3Oy2mBXfGyIDPYHJMQzrri6EHHR+wvo42nfadodL7C0RGuLxeaHNSD7KGfdigaYnrXC2Yui5a+qU5eq9UL40/lILyUfcIRyYnG4JKaKgELi/InMdL9hHx8kpLcz2CaoNfRxDn3MaJxNpCQlTUhtos040VpIsHQpBDqd8iTmP/nYoq6Yj4vwes8hoyTi0vdAOVY1jYB3ICBafFPTOCOqDpfPmsu7lLbKCmSqOsUaoZId7hHcDXjlCKW9tHvQMcpO4w1ukO1SeoztQv8dvtfPSyUU/RJFlYkqEAXVW9sdnBaMtXTEsIS3e/sX4/mxjDmMkWA4OyOzHpmV+HMpZZDfZS0hQ+eD0e6uyWreGaNJNIZvBHQa+wsMHP/Yl4dGmou8/XvOXhKjukBsZ65UHZMfBY/EGNpmNy9XklptmLkiwgFKIBeQ5y2FPCyQETGme143jL52uDg= 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)(1800799015)(376005)(366007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: MsBn8r/GyFdpFfLTd0QIO95FVVyDFmsDFzLSP5oY0XUCu54xZdtBeOBl+/QGS7yo+VapxYwbJmgoolmp/NDoxq7Ct6dTVCwxoh0vS08hJwJZ/zUUuJVThYa+OWTrbwA010grmCD9+667jyLQKvW8M4Th9351ZxJ4+RcOnZa6NKullwD03f0MPbfddN0igdqI1Q960ShAcE8gF2kDbCj4HGYs1jgb29z8ZjyDVO7Q9hpoPfhSLFI60gmyR21qDfkpCknfEqZnfoWhw+mDI2+4Wd5c84t7ruFNpD8fSPCaQhXKeBYUHkWhhNeje+2jhTJ/YRzznVubJoCg+vFlkDs/qmR7SotcGvxBHtk02r/MiR0/Md7LeL1iGwlhUU8Ff6zNGR1NU+lIwKrcrotDoFOC7TV+E2NzsZjuCxChHkXTapoO3s6msFCuThjJRPlJdSAc4Vl3LdpFXtpJxQRqUnOPYuRcxRHqtk2nvN0yHs2fo0YS6uLQbBSXpXO8dk+oQ0KZQJdEXq8iloAAsi9z/O6PcHNTpLgn9nTiGuw6PVdLKRMWNaMpEi3M79/e8mPw+KuvVLgJkh6TSVa6XD4771xL5crhK5/ES2RiYXcJ2OmcvQx8y0A21dEUJfZ0tk5xRW6CU0Uo9c3wIT0pGpr4d1t3Bo+aATkl2o6DK/ocHq4/Pdhagf81ih72LDF0HiDLrASLuTwl+cu1G+3iOQ+1IhN9bTkoYzyWKXLSc31zEpW6OZrsnWv4i6IEYHGDZAQGMruqDzqh/yB09gwncC1QoxeA5FF8kfqKm01aUDiAfOTomQJahl6Oz2Bx9jqA4ALUD6pCrw2IwyXQGHuDguAZMOtuKxb+6iudplbYSG8ryt6dvmTRXT3vPCOOt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OphBTYqMsQ5keySH7q1eoThQkFDKZZ8PFyvxya9NsfjRpTMZlVht/gFSmg0VuEurGjblYSpL31XLtRzExb4gNCSpPvEDQCP5aVJGWtf0+iq0GNvxqluxcfHqxXiLmFzfCaNpjdeVOXL38JFNm0F6f3LTCCqw9jnn7xUBqz2t6jm5nUN5ZXjyS01skiKzwh1CRPFbUcDZNiH11aMetFxUWPxQ25v8NVudNrUR86+QszHfao+Ra863FAyxV5TRH88Ecm0SNQUU0Y95ygb/25qZwKhCWoCHpYjSY2n9OLrgzLzrdGEbN2O9dstKh5rEmTikznb/BNiKQgFO+j8eo2L6x15Ko9IJ0q23GRD/JLr2/MOAZWGSfgUji0ZU0WXL93KSy2E= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: c6016f5c-48a8-4bc7-5679-08dc482512f8 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:58:45.2125 (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: C3K0sbyBO15kjKh7kmQW/99STwks1Vs+3udIkd4uiZRtubHTTkWC473s9mM0Jp0BnP5Iwet6ItpEbQmJPV+BPA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR10MB7460 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 bulkscore=0 mlxlogscore=999 phishscore=0 malwarescore=0 mlxscore=0 spamscore=0 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2403140000 definitions=main-2403190114 X-Proofpoint-GUID: dBKaWkjNlakqs7myNuNyI3sx_7eNGHC3 X-Proofpoint-ORIG-GUID: dBKaWkjNlakqs7myNuNyI3sx_7eNGHC3 retw is a helper return variable used to update the actual return value ret. Rename it to ret2. Additionally, ret2 is used only inside 'while (1)', which could potentially be declared inside the loop. I chose not to do that to minimize the number of times the 'while' loop has to allocate/deallocate. Signed-off-by: Anand Jain --- fs/btrfs/extent-tree.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index acea2a7be4e5..5064cdd55d2f 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -6125,7 +6125,7 @@ int btrfs_drop_subtree(struct btrfs_trans_handle *trans, int level; int parent_level; int ret = 0; - int wret; + int ret2; BUG_ON(root->root_key.objectid != BTRFS_TREE_RELOC_OBJECTID); @@ -6161,16 +6161,16 @@ int btrfs_drop_subtree(struct btrfs_trans_handle *trans, wc->reada_count = BTRFS_NODEPTRS_PER_BLOCK(fs_info); while (1) { - wret = walk_down_tree(trans, root, path, wc); - if (wret < 0) { - ret = wret; + ret2 = walk_down_tree(trans, root, path, wc); + if (ret2 < 0) { + ret = ret2; break; } - wret = walk_up_tree(trans, root, path, wc, parent_level); - if (wret < 0) - ret = wret; - if (wret != 0) + ret2 = walk_up_tree(trans, root, path, wc, parent_level); + if (ret2 < 0) + ret = ret2; + if (ret2 != 0) break; } From patchwork Tue Mar 19 14:55:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13596757 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.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 765EF6166B for ; Tue, 19 Mar 2024 14:58:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860337; cv=fail; b=eVoIi3MD7PpvE5Z1cOj8DdD9F5u1+0WfIU6NK1LTJlM4a3VR+9mfow6VskSkLt7zjelH5Vk08kCiFbhkacYqcu9PbmrKlVuRNEy3c4BhG5ZZJ0u/v4GPEG3AzVQvLSeYr+1g0Z+mX0Ia39zJQcgS61RNy2ygF1rFqNEGWfVomK0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860337; c=relaxed/simple; bh=LecBtQW1rjbmgzpx/+Kb1XZZgExFp9Oecw9vk9Pa0vs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=JCB8T/+zjdAS8Kz3iXMHXXAbRqGkhr4gFPQ56O0o1e8Us6zrKKVk5iTXo4jr2xzEfGNiu47MYUq82o8waDly7hfdQFNrhdfR/1uRX0IeEj5XnLvLKWMI/1fw0BcuKtE2Chb945J5Lj/vWuP4cwWITouXQtLUZl8X729moNr+SqM= 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=kIs432up; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=kTf9tQbC; arc=fail smtp.client-ip=205.220.177.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="kIs432up"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="kTf9tQbC" Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 42JAHbxM013398 for ; Tue, 19 Mar 2024 14:58:54 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=riZhxZpcuXPdGh92DElKmHVbn5ca2hqwKPK/JH/OECM=; b=kIs432upxFjpSop2nfEgL7H4EBuYjPPC9ShzcibSF03L7aKvfnf1eai0zLLlynU1AX5T R+Rz57LJW2TeRZMD0CESM/y9DkXl30hcb+0jvc37iGHz70MpZmrECtcm8XX6KCkm7bc3 SFQaFTYiy3DjqdOpAWef5wdjIHV6Xi5VMlnKjO+LVxWliCyxokoxMMQtGvmARmzp15gT 3hBE/Bf6sQj9K0hTfFgsdWZZ55as4mJezdTsmXOctq1+3mIN4HlSUBFhfo5LFxKVwExb 81iaIs7mC9BWxQ1rluRpETuAkYQd0imUhUfOOtS2o50qt3wNpyM/Sxp/18YIizqC+kyF Ww== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ww1uddrqf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:58:54 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 42JEAqAn024383 for ; Tue, 19 Mar 2024 14:58:53 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2100.outbound.protection.outlook.com [104.47.58.100]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ww1v6mtfq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:58:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lJgfHj7KyRuBheMynvaJz2rF8iruPGFeg456mwUisC7Zquzno7BYYSII05hQf69H0XKg+gZsW5Qd225miixe2oYvClU3t9MJP5ZwKnabPglxe2Zw6FqTzkJQYx+6LCnr0SH4GDhRv92bQqRWB8ks+DeJrJWPfLyacDo2esCYaVb+1uwlW8V9kWxqJ46lFU8GmCdkMLjicEP2woOX/n/zEsSB+UU2lYNQt1gvHsviCTXIzXrimgO4C5t+rtQ+GfsnZTpdIqGBE3OXcixDFENQpEfVD+G7pL539ghKxvmih9EeCV4QPH/O89R11J9ZqYa9EsAz2SWzSnLKGx2EGXS7nw== 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=riZhxZpcuXPdGh92DElKmHVbn5ca2hqwKPK/JH/OECM=; b=N2AGQiTvnSVM4zibdZhwfKimx0nDy1BwCP1yr1DwP9HsrKra5fXDqL07z67b3+ruHK/jhfXmK3WvJGYwUP2Nw+WkZ22GIxr/pwfJUCKdSnACC17Ko75/Jdo476WvpdqDsW4sVpNTcPBKifrKeHgCXLu16iuQ1nsQlJB4LrnIPqS2VNqczNS9I4PRD/84qfupFGqzT43+E0gqmtGm6vw6mnQXVo/DlaeYjmXXtdLCSJjzC3knRHjqERk9WbrKNHhynoD8UHIjgrZc4yhQDTsOpGzixJ3K5l22PvELXuT7ISR3801Ck9/Nh5XDblEJ1ZZjzJ5jNEfUvxKMo0vl8sHyGg== 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=riZhxZpcuXPdGh92DElKmHVbn5ca2hqwKPK/JH/OECM=; b=kTf9tQbCwxohzZnLq6NmaE4oK/YOZaRyUl9wkGdCxxCjP6y140yYENNGdDW7aq6g8wa3XZqFkzcpYkqGbuhJq+InwMnjfOjLHXDAg73922+98Tu8ZoGWJLUZkznKpSgP0MiHnssUaJtd1zC9VGtSJmU1T0GXDEYZ6ENlocUpHCs= Received: from PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) by SA1PR10MB6543.namprd10.prod.outlook.com (2603:10b6:806:2bc::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.30; Tue, 19 Mar 2024 14:58:51 +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:58:51 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 26/29] btrfs: btrfs_dirty_pages rename variable err to ret Date: Tue, 19 Mar 2024 20:25:34 +0530 Message-ID: X-Mailer: git-send-email 2.42.0 In-Reply-To: References: X-ClientProxiedBy: PN2PR01CA0145.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:6::30) 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_|SA1PR10MB6543:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9p0aaSXq7FuWGYJF0oIqqngLlexC/bmvHzgng8dox1QUcn1cdsMG0nk5IRxsHftxoT2gKxNXzJvT1q+5PVrSS8/WxjWUOcZebPqo3Ufg4YR0MDeGGwzCiQXXvPo+VU3A0t/69vmgRRHIfPm83voRFo1UJNihZPsInKhXexfYT7x9kX7ZQjHfInKdx/DARDeeZKMPuBVkhq9zcHNP9sZOCWDhJ7f9MlG6hx+Nvy/kkXe3uOg/GhmHBhIFBfPkuXcDneR4peFTQjGvW1EE49mZWMCoP52z7owGlxa/0Gul/iyAwdqgKsphPFDDKPSjsTUieLxVSvcdwi1hyE1Ucnx32iAd7QGqW5viNcL7Hl3CxElim3hkU3FSAFZJWB4ITlWwVDGD7PdZNHsa7FT04PqiskE1LJWQS0yk2rEmO+tXYQqcbGYWpWQ5OMb90AZPEy4S2TV8R5sxNyH+iy6+AszCO1d2605RR4/qCSGoH/Gxa7yD/0yGZXf1myu91eR4bmNI5qTbIs70mSoecnk7eNVO2L3Pc4VfDysShftOHOWKv85uyqofLDjLHBZxABpLgQaBvncQ9RxGCwaVilfeTr8d1JpK/rFwNBbl1TztyUXzHtSQHwpRFeelR0MbyNtn/sX81kUIkI/qvCkZonCRx0TL5g== 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)(1800799015)(376005)(366007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: m9QFK4Wz9+EP3zHoCaBz7NldpT8mFNSW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a/R95k5eVo/wGFn+iV9SADygbKh1RjOeYJFrzPyOQJroiiT7/cgPg1bQ3nyrj/HK7m3pdFxhecEAgr+A2/R+1hvDwZXVmlG2Ie42TTgW/Rn8QxOTbQqRUdeopKvyg9zBJxlreiUI/3mH29otZPpjmYFLDldoGx/TAjDg= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1488b3f7-d1f0-4aac-7540-08dc4825168a 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:58:51.4457 (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: oPCUd6d6yQ7if9Fjs53P2tdQ6aJYqt3hKq22Zi1kCNS5BAz0it7qlMSOZvH58MYIcXCfP9qtNKDVKUGnJhassA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR10MB6543 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 bulkscore=0 mlxlogscore=999 phishscore=0 malwarescore=0 mlxscore=0 spamscore=0 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2403140000 definitions=main-2403190114 X-Proofpoint-GUID: Oejkt4sYlzPz_1I0pwSmPq-M9rQKtYcS X-Proofpoint-ORIG-GUID: Oejkt4sYlzPz_1I0pwSmPq-M9rQKtYcS Rename local variable err to ret. To make it consistent with the rest of the code. Signed-off-by: Anand Jain --- fs/btrfs/file.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index f9d76072398d..f55ac15d727a 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -128,7 +128,7 @@ int btrfs_dirty_pages(struct btrfs_inode *inode, struct page **pages, struct extent_state **cached, bool noreserve) { struct btrfs_fs_info *fs_info = inode->root->fs_info; - int err = 0; + int ret = 0; int i; u64 num_bytes; u64 start_pos; @@ -158,10 +158,10 @@ int btrfs_dirty_pages(struct btrfs_inode *inode, struct page **pages, EXTENT_DELALLOC | EXTENT_DO_ACCOUNTING | EXTENT_DEFRAG, cached); - err = btrfs_set_extent_delalloc(inode, start_pos, end_of_last_block, + ret = btrfs_set_extent_delalloc(inode, start_pos, end_of_last_block, extra_bits, cached); - if (err) - return err; + if (ret) + return ret; for (i = 0; i < num_pages; i++) { struct page *p = pages[i]; From patchwork Tue Mar 19 14:55:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13596758 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.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 C466E6166B for ; Tue, 19 Mar 2024 14:59:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860345; cv=fail; b=HMRIIYJQSCLZpLFs+sHCVZyPZ3BzYyIfB9lUtQO53uKyQpoTRv2VajbHnAiqkcrIVel08Fc3Oj8rOCYBQ4E6AhFAfbJ2+k1TQPZBQ9szVD15EhCAkZdEBHtacO2cf2LT15QBwQcS9U/o6GNvq1eM1dy/hWarKtWm5g0sBc8G2YY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860345; c=relaxed/simple; bh=ORBl2N/BuEcAvwM/dtY1a9HWD5bxAropT5MV8J/L7T4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=I73ZmSMaMATwmsLlewFuqmdaGO7aUhBfK9b04u5FlcjSjBIZroMq0ZwvySCJhaWT1dSEx2JzXfkMyqLllwbZ3NIRB51AnOuAyYCOLuiwbLwN/STS9jBzp6642njwdeei17cJ/kQmtfXOAccbiUg4+UHVWP/zUzAB3QQSTwU3ENU= 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=GDr77+6g; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=iwHHe0v8; arc=fail smtp.client-ip=205.220.177.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="GDr77+6g"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="iwHHe0v8" Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 42JAHaUV019538 for ; Tue, 19 Mar 2024 14:59:02 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=XS09fQugkocpmhPWk+INIcOWZNldXzvCCxKu0rMSODk=; b=GDr77+6gGtiqU2hy6QdYRWD8kwhukLdlMBrwv52N8KsxPEsfTSbBUvDEIp8PeeewuMWp qTxydTn+Lx8Sm5lFelWFgXZVE+dUTBuBK2Lucbcia77hlHw/UybrCumC0e61cFy1Y35Y IfD25Ha+Btadfx7A9fb5ReAw5UEaXd+2udYal97zMty6mX0s1pDqJKlzCkITTbCrqpj0 oJCJ1/533VVLp9q50yO41EUYvqEyaw9PCir8I10JY8A+pAX+iX6zRfOYGBrZ2sXpFbrd T9VrH/amqfD6a9f2+RJGiLGBs9gcYeF2FbwgyG8wRig9mWSlehvGtQP6xNefiI2hELyY yg== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ww3fcntpd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:59:02 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 42JEIYvp024266 for ; Tue, 19 Mar 2024 14:59:01 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2100.outbound.protection.outlook.com [104.47.58.100]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ww1v6mtp6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:59:01 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d8B8bxRgmMIMlcirtjnbad6fCV0tbEoRlUhVClHffYg0GMrFXJXsADSDN5jvFC3XPZbRO1FdMjuZrOw7S4UqIvz/IuwGq2lhMshrbWdybOof2e/yPf7blnMtiy74oXvbuiBJC1T9l67g46G+xkozF+0om8AD0qGL56Y0ksOCdj5g6YAM6Li13ohnISFUyIz0EaZAbU10e4xhwPJTXshTjIIkmNdgdFtxQ7DXlLUmWXCEPhK8c6H0nwplcNsGbP1B5MBo+Qz0CKVVYMlYJ0Nwg0scFU4hpfU6vlQPSkTiOHImFdiGpfOKuIBVg5CI58z/U/lU/DkZ3/YMXAEv+gXKVw== 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=XS09fQugkocpmhPWk+INIcOWZNldXzvCCxKu0rMSODk=; b=T27x/XuQA/T38uTyYVMw6FHj/PsD2JVwOZL6roF0qKsIVNNfxBp4MIDh98lfTIQGb7o4xMHB7vntspEfStr2qnjO05u+rfaGMeZuZmyUe/GeaHXipDfqRRfQadWG9HZbfXUDcXUtCR85KH91QfNMEXCC28X2Hy6wkmtG94vHZpd5xmwtKvX2/fqyq1YzqJ3CfIKUuyYquQXqmk9im8OorLhVUB0CiovdNGfUO+upqvmVRnqmz323SkW7kOsJGAvWjETA/OPh1VCQtc3dVRb8nqkwtKBAGr0DVzMSHWrIz2Rk+osqBQV257zDYKwoaNfzMLwByX4WxHN0BhtLroZBUg== 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=XS09fQugkocpmhPWk+INIcOWZNldXzvCCxKu0rMSODk=; b=iwHHe0v8FRd/XSn9KHJ3b+hKauhmIfW5Rb+cLg1Zee6b74igYCyIoerz2Wky6xsA0ZitFyWbmmOwH1WNKoH45MLW3jQcvi+atgDR8/bDTGT51+IyhbFHPe1xbSTbMduLKQDS9FNWEqV4qVgEKhsyyb+hQaN8s5WO3LB99Gz2g3E= Received: from PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) by SA1PR10MB6543.namprd10.prod.outlook.com (2603:10b6:806:2bc::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.30; Tue, 19 Mar 2024 14:58:59 +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:58:59 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 27/29] btrfs: prepare_pages rename err to ret Date: Tue, 19 Mar 2024 20:25:35 +0530 Message-ID: X-Mailer: git-send-email 2.42.0 In-Reply-To: References: X-ClientProxiedBy: PN3PR01CA0003.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:95::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_|SA1PR10MB6543:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IYg6InaorFI+xTW5YPwg44tCkQAXvYEb++a6ZwIr0QcRry2u/17iBJtE9cgxzTAVVgn19ckjJKqWzN1ZZa3sZ2TQzMF6ahls6gJuIrSlC7v7R4aQjH4Xhfbw50ywK9bGjJb6FQySHxokULM4uNtbbekwNMa4B5SKH9vq1zVsL7Ep/mImaO3o3ul2RvG0j87ayJj0YiM5IGyU5lKNB0+UL8sIItMjHb44UNYD/0MyPmthPPImHBazLGiRIuzU1/N8koGxdeNXhcMz570Fq+oeZGYl7azLjfLQnkzTRXWeoOXaNbbaYR2+9h68FK8t/eZTiweZ6ag6DQEqaQh06JM0X74MBDoCpQNKJpoXe9xz2rebqFRv7c27CbksGy/y8EowaEbC95QmhFXRUWlxtc5IyvN24v1DwEnK4hMYeZY0G8TdtXN9fbTUXpXHmAqrXgdPCAbQyI7kYV8ue0GehGi/RWIqKxRVv/dBaCKGTptyB5WZudkfTJxhlAHwzU5uEp5qvGX7Rvw+mhwDN8HvmTeweMUwa0z1YjOdwmFslw7Nqatq5+i8P2OYSBG9ti1ss7SUnF0GxoGKkgGuo3FFr8x9b6nsDHkzllORehKjaY0Chu6qmmYlca+sHFzF/XKN7EnDje+l68htapVevzbfWInCizI15w0dlZvwNzKhJQ8aXS8= 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)(1800799015)(376005)(366007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: WLhI0GiUVKNfaPf3SY+FhMvC7TMiTZKJcSGRh2uVvaMfoFxWBXVZ+KxkLtUoE9pAFdGStSjFNCFIrJu/2aUzVyM/wbfTbLcFlQJvW8Po9aQq1pE50BIOXLKZEfGI2BuEoxM8eVFRYnWebeBfKcIjPXExZU0xHbNS5FOxYiJYYwOYRQMQ9K36GIusDCU9FEqP/OGz/1pFkTZn9FbYQOiW+HKggrcw4OqBCK+J5InfvkEt4lgPNqY29hLrbF47ilx/AJPc+GjtmMXb+1XYn5riNeoKti/fqGIwhnEJsP7TL3jT55y3B8l4agH7MoHkz+5N8TNXLsVRRtr8Atpd8YVLj/6o+b/OS86WJT7u8X7uW+U09rnth8HWZ3rutq6pp9Bknf6JHcGn8t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EOGLk+jmkvLvotRMQ35oEAZLhdXrboEdCQArjyh3LRQVa9yj5CxFZbazJ20Ht8tNExvO69Q3mTDlhL7kT26RrxCTOq2OwMfSf6hS/X4oi+5W3Lk4j2TrJ6LdsCoaONiysLURz5UF0qK1TEY7EMK3oWxP40i3ta7OjvEFe7p1+0et+HvQs71346oxNB4BTrzsBwHnUyZ X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: hNcRYLr9EsMZTFLBoA6/wUFYXttjr6w7OMR7k/7StrtGCjBADN1eyPmLA/aT9cwPWY8M9KEjxqL9YvHO1chPSSE+K/WAEmK2wTBUzJmtgkP2sL+tKqkfFnFwvZ5cV9mwQ24RzGzVCrphrLRQzzIiadgXxrUHyIr/zmEvdTDqBYcdn/xKC3OXnEGNJpTRbEO15NbZtXIshqzEJUZI/7mmL0TuRmq0n2B8B2x6PIIGkaj/6PQFN0pDwf0G1Qjaph0FztzE9tFFCJbfB8gvpXHidkCDDuHBGJVVt/NBP4JbT/M+Gz+AQYjSOUR3r+5Fx4JI0U1F5NtIYTNhBFP9IDcJRdlhPzRG997F4QZVySRCwnhG/FRelx/+36gtYa5StuL7w+QxQSNa1zsFzAC/uKcmB7NuaUKtmeF6QNn3CKenndTSKKSf7CwlXRb9Et9stqLg4seRyrnMy0bRI+YlI278Ierr332/td1/1Sc2+olK1atX/2tTI2DB/drlzzUQS2nckC+EgM499McncEfq3XCnxKDgBUpN0sAvS4/XiEfpHGgqHdmYug/GJVlJO3sJksBixQ34Ae8SW1V6wtpH6qHtjA2oKWhMhN7SP0xoI0rpoN4= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 539d6b7e-9bf7-4faa-82a6-08dc48251b5d 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:58:59.3598 (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: PDSgCxLOlYXs+j+KJ2S9gDE6pIE3c05bEzMTYzHUREPKpiGruS7nn1reMAOGSJN+HPJmLte1Gy10nScKpB33Mw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR10MB6543 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 bulkscore=0 mlxlogscore=999 phishscore=0 malwarescore=0 mlxscore=0 spamscore=0 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2403140000 definitions=main-2403190114 X-Proofpoint-GUID: mEib9fcYlh0FozhSF0J5n7zsIWIUXj7a X-Proofpoint-ORIG-GUID: mEib9fcYlh0FozhSF0J5n7zsIWIUXj7a A simple, trivial rename of err to ret to maintain consistent coding style and reduce confusion Signed-off-by: Anand Jain --- fs/btrfs/file.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index f55ac15d727a..c22264c9cc45 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -915,7 +915,7 @@ static noinline int prepare_pages(struct inode *inode, struct page **pages, unsigned long index = pos >> PAGE_SHIFT; gfp_t mask = get_prepare_gfp_flags(inode, nowait); fgf_t fgp_flags = get_prepare_fgp_flags(nowait); - int err = 0; + int ret = 0; int faili; for (i = 0; i < num_pages; i++) { @@ -925,28 +925,28 @@ static noinline int prepare_pages(struct inode *inode, struct page **pages, if (!pages[i]) { faili = i - 1; if (nowait) - err = -EAGAIN; + ret = -EAGAIN; else - err = -ENOMEM; + ret = -ENOMEM; goto fail; } - err = set_page_extent_mapped(pages[i]); - if (err < 0) { + ret = set_page_extent_mapped(pages[i]); + if (ret < 0) { faili = i; goto fail; } if (i == 0) - err = prepare_uptodate_page(inode, pages[i], pos, + ret = prepare_uptodate_page(inode, pages[i], pos, force_uptodate); - if (!err && i == num_pages - 1) - err = prepare_uptodate_page(inode, pages[i], + if (!ret && i == num_pages - 1) + ret = prepare_uptodate_page(inode, pages[i], pos + write_bytes, false); - if (err) { + if (ret) { put_page(pages[i]); - if (!nowait && err == -EAGAIN) { - err = 0; + if (!nowait && ret == -EAGAIN) { + ret = 0; goto again; } faili = i - 1; @@ -962,7 +962,7 @@ static noinline int prepare_pages(struct inode *inode, struct page **pages, put_page(pages[faili]); faili--; } - return err; + return ret; } From patchwork Tue Mar 19 14:55:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13596760 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 329FA6519E for ; Tue, 19 Mar 2024 14:59:21 +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=1710860362; cv=fail; b=BnIfLOiT1ErDNAlnmrbbFAjPZi5lsX2W0YqWG3Q7PV+4X+nOv2otpDhSFGV0PABCIG1xurYzSXm/vxCc6MjEGmLxJSPlubRbaLgiD923kSbrwt0Anr90j0eGC3dQl02Cx/kPbzshcWVXj3JJxZmSEV26YHT0I/P2KDAdIzMQbLg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860362; c=relaxed/simple; bh=NrKUCUNSkPAFZVJEO67fJ9G3BOuLXiXpk4no3W8QiGA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=olIqStcy0J5BT4nrfbydMeTHF4AkHYjcOGSGJ9jHR5YDZfoJAK9rV7oijOOkJscFiaxYxY0m4LjUgb2A3OO4S/VPRGHc5/Tb9WUv1+6o2O7S44W7CpSAS2om6XcIiVum7444yRr2GlvloOTx/21DTseoRmcUlvqm0kXeOsdH6nM= 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=EgOVqeVj; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=YYw+nX7W; 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="EgOVqeVj"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="YYw+nX7W" 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 42JAHn5G005071 for ; Tue, 19 Mar 2024 14:59:20 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=YLZv8N2maqoEDfJVfDlUa2TU/eIRXRdSztw2zeL9JzY=; b=EgOVqeVj6UzsL89+Eh/LziEzM+sjj8AE98wGlIlNwW68tL9Oaqy+wAWRtLu34f7Gh+vX 3bLSNKPDHrViot2Ff4NrA2yH1leYfRJYL+PueEDh9/0RJLl9pyuMbYvN/Q6tVY7kKyxJ 5pcZj1k1dYP4B7SmoPsKq9WD4ELroREn5d7bY5c1iaKo9BBfZdmG+QupddyPv7V3NCZ/ qB+PnQVCS/umh8ymg7M/v/w6dh6T17u688HHxtjB5uqolGb13LLNo1kV7ez0pVZzbO8K n+k7vB/Cfv1LOlxBJgpcMHTiWjeteGBBn7QPN7mhCKtbFkXDPihbBSEAqYRsyLSYZue2 QA== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ww3aadnn8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:59:20 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 42JDbQXj007776 for ; Tue, 19 Mar 2024 14:59:08 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2101.outbound.protection.outlook.com [104.47.58.101]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3ww1v6cqea-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:59:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IjiG8hlJWl3tLdM5r6YrR41/ik0pBAa0gOOqx1sY+zIHGmmJ9jPE4C461TshmE4EQ3NGGq8FaJjHu+sp5mLMYty0ctP4xaosgWlDqazXpnfCI4cZmfWAVqDcHG+COz4n9tzmXN/N0XxPhycRLXtZlBAT+WHQi8UyFhTTQGNmp9Qy9OUfOHFMi8BZtAs8ev9e0oodjeZtx448NfyS8RhuAxx2C4r2yueHc9SnXhv12M386vosn7InJaZwTCR+GCtHJ44xbaUPV+V8Ae12yTR8KR1d8d5RHBLECYqn3ZiGeJ+IFP1MVnfwm0pnpzy/ZgdcgmB2JeJRqK2rDptXJUlbkQ== 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=YLZv8N2maqoEDfJVfDlUa2TU/eIRXRdSztw2zeL9JzY=; b=FdleXcEtJ5KQZAlJXC2osyGpdJD0xeE9wtkOPCrDnl4um2DUezxPzNfzODdigLnTemyvpDqDCOcoqyjGFfgybonCQHgxy5eCFKwg5MtN9glm7b4FmfI048A2fy40KtXnPW6cz7OGC4Tv08WE9kBC4M2FW5aKMyR2yVRvhodsQklcb7ABbK+bfgJOlr9sC9K4A602118ohngU6lWaLfhBvdnLsYwzn6CSadyWeCePRTJfRm2MUaTf9BsIOQggsb00/N0yyp18r2ypUbK+axdE4S3SyQfMjJaLZ4af7G5juKZNolbDK5f2SakxGJeh2cEp9lwTpNauY7d54xGtdzheAg== 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=YLZv8N2maqoEDfJVfDlUa2TU/eIRXRdSztw2zeL9JzY=; b=YYw+nX7WdmZr+y9PAooXuG40ZOBFYwyIlevKC8jsnK/XLyywmNHLhNsystx2OEM6fnjrfBUp3Ex8jn7a8WvNFAgvplBN5kVbekI+WfqwbfrAKJqJ80PlGzi9gUN+qBvK8HXLBjt835kbto/EZJAfOcefxdhcXP4XS2pzQaGPzGg= Received: from PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) by SA1PR10MB6543.namprd10.prod.outlook.com (2603:10b6:806:2bc::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.30; Tue, 19 Mar 2024 14:59:06 +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:59:06 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 28/29] btrfs: btrfs_direct_write rename err to ret Date: Tue, 19 Mar 2024 20:25:36 +0530 Message-ID: <572defdb1a07bd51a8626109c9243dd7962f2cd4.1710857863.git.anand.jain@oracle.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: References: X-ClientProxiedBy: PN3PR01CA0058.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:99::17) 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_|SA1PR10MB6543:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rwqtZle1K7lbpOofPgwoSM/5A7Git7w2Q5cfPWCxJ3Wz4IC8fPU96lR5PE42fod2/M3fo7kXq9qcoOEo53pny/zisryOGuRQbSeFUEGiBcKRP6vDmDj8KowMaYVJjHdVETjggRIhjEC1BqZfqp+Yf9IRM2ccIC6gcT6eW4eS8k30RmzQLYRV4gpisGNuDPiOCRmPuCwKHt7eRQ/FsN3A6shFkxeyX00VidFRu/pclR3iQwecKG7NAizs23a1Q6k/dbv+CrR6E5KJqxOLIefJE9Jo+Ng41GyD//e4FTFLBOeFpi7h8JnIlo934Eg8SXuCqFiPAz9pcZySInTN95srAQDwjHRypvL+Yy/WawKZqqWStMW1zPcB7qTIx2Rw9Psso8kUIeOu01pShXuZY/vk2qk53wApYziT6PSRhoMsAK14yZwTnpV9uRB1nxx85nISln+TjpVTJysfHmdQZTfChPklenIUjSnWtCYivBaEnsH2KvoVtrucclEYfn9Fgh2tyjq7SNwa3gEqhTOnukuxzJfAK9e3PeyzNw5+c1hojLgiFmz1iUP9rUBgf0/j4qErh9z4TDcGWVUQjU/DtT+WwlFFBssbnh/Ih4QxNk+IqFFT1Xd0gH5AEExZYevgab+Fp9xBEHoAFb51Rq0J+m3AjvNYLSRzegVC97AvALlEo9w= 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)(1800799015)(376005)(366007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bUAmN1B5J10hlnCZawLjhgRrbVRoWd1FEdE4mK7T3TW+tqoLbWDkoVvgi8hRv1JvLrqnBSDjTux/ulaPUTfbm/3ciPn2UxICrchy239zAew4l/EX4bKYkYt94XfIzhSJT4qUMMh9dDe9tud82PzIjXNO1oylm/oynPVhN/aVGxTDRhJbmo7Sj4D+IaNeeXlKTjaP+zX8BxQj4jt9cGWInnoQnB/wGPoIoqWbExVZ3/2jnJ2QaMLH7S1o9U8009uL74nuCczKnKHxjM16/Nijuh7XZa/OTqpX0FpyFa2w5s0dfSmE3LwKemeXuEhIU7/mLSVW6FHcAh30XP8kS+5mzEuZYBqRdCdnA7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8xRrdPcEELq/17jQy/icBZdS/Gb4ywnXIT5KP1gHzKZzBx5iSXFOpo6vdNv3d4N+JLuN5Vqj4SfzfSAtWFsuycOrtCsrDGT6OavrXFiPUMgWyQxuvXR4thrZwCpj2kj/Zux4FdRraiRCbcHc6tb7lQJoHDOeY34xaMJaqIDXlaoORF0c5W55N/hTQEkbjaQAXBWuGjLXZG9pHTUTcfLRzBQgcA7J/C6XCvvYfRSbd X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: gRvRDhd5juWDF8etk6JjGqwBzujAxyKxA2bG8ynj+CxloEF144Fk9FQZcHzFeQlazb6+ctaRatGIVBXICwMMHuF5TolQxvOGi4AiaPtR7tSvZfnccd6+X5GtYP2DRXx42YgDF3dZmD95rbcuGlAFndbeymcNGB+ee1tOAqglV9rMZA+SdbKrw4lCs56jHeXda9e0fLPGDLeDKmQdxICavLrpD/DyIyiscz1NXEx2xEboax8IG5L3MHgm1LRYwks3zFkToD/q56uWbZi/wnIodPsC4jO+PM0z1hQBEf/1YQHqbtfMrFmsY5LbhwZEgdJPW7tjP/AUoN3Aqcctgkso8VEMXt0EzAAnNnP89nZ4OZ1/P9mQh1/oiFJBF45FqyZTjFydjOCNYBVRU+dGzS/InPHzuvGubk7t22qef9Mi78dvpehdI2xxqLfaVSaL0SqCOkHq9vw8ULjml0jUW+HuvgiydxxddRnlbIupN01kcmnZBiRuNSSXVl5gKD296ZaPEMeXFB1RUTevl3vwaTZ5RAz77hVgwPLwRkgQTmzZeyXoqg0v11Wxydjc9wigk4m4l3Va9ILsWfabA0ewyDaEcXKw9noAk6oBXaqwrqEefOE= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: c7407fe5-dfab-4af1-9f52-08dc48251f63 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:59:06.4767 (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: rpjKxld3AWcM2jMJ0c3sWl+m4GNqXRPLPfzLSasSheO5BU13iRBMCYeoOIAp2mIGC8C2d/jbPN//msEomEYFbg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR10MB6543 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 bulkscore=0 mlxlogscore=999 malwarescore=0 adultscore=0 suspectscore=0 mlxscore=0 phishscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2403140000 definitions=main-2403190114 X-Proofpoint-ORIG-GUID: -fdjwpeFkeNwTALHo3qXCO_tfR36Z2BI X-Proofpoint-GUID: -fdjwpeFkeNwTALHo3qXCO_tfR36Z2BI A simple, trivial rename of err to ret to maintain consistent coding style and reduce confusion. Signed-off-by: Anand Jain --- fs/btrfs/file.c | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index c22264c9cc45..0c23053951be 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -1465,7 +1465,7 @@ static ssize_t btrfs_direct_write(struct kiocb *iocb, struct iov_iter *from) ssize_t written_buffered; size_t prev_left = 0; loff_t endbyte; - ssize_t err; + ssize_t ret; unsigned int ilock_flags = 0; struct iomap_dio *dio; @@ -1482,9 +1482,9 @@ static ssize_t btrfs_direct_write(struct kiocb *iocb, struct iov_iter *from) ilock_flags |= BTRFS_ILOCK_SHARED; relock: - err = btrfs_inode_lock(BTRFS_I(inode), ilock_flags); - if (err < 0) - return err; + ret = btrfs_inode_lock(BTRFS_I(inode), ilock_flags); + if (ret < 0) + return ret; /* Shared lock cannot be used with security bits set. */ if ((ilock_flags & BTRFS_ILOCK_SHARED) && !IS_NOSEC(inode)) { @@ -1493,14 +1493,14 @@ static ssize_t btrfs_direct_write(struct kiocb *iocb, struct iov_iter *from) goto relock; } - err = generic_write_checks(iocb, from); - if (err <= 0) { + ret = generic_write_checks(iocb, from); + if (ret <= 0) { btrfs_inode_unlock(BTRFS_I(inode), ilock_flags); - return err; + return ret; } - err = btrfs_write_check(iocb, from, err); - if (err < 0) { + ret = btrfs_write_check(iocb, from, ret); + if (ret < 0) { btrfs_inode_unlock(BTRFS_I(inode), ilock_flags); goto out; } @@ -1552,15 +1552,15 @@ static ssize_t btrfs_direct_write(struct kiocb *iocb, struct iov_iter *from) btrfs_inode_unlock(BTRFS_I(inode), ilock_flags); if (IS_ERR_OR_NULL(dio)) - err = PTR_ERR_OR_ZERO(dio); + ret = PTR_ERR_OR_ZERO(dio); else - err = iomap_dio_complete(dio); + ret = iomap_dio_complete(dio); /* No increment (+=) because iomap returns a cumulative value. */ - if (err > 0) - written = err; + if (ret > 0) + written = ret; - if (iov_iter_count(from) > 0 && (err == -EFAULT || err > 0)) { + if (iov_iter_count(from) > 0 && (ret == -EFAULT || ret > 0)) { const size_t left = iov_iter_count(from); /* * We have more data left to write. Try to fault in as many as @@ -1577,7 +1577,7 @@ static ssize_t btrfs_direct_write(struct kiocb *iocb, struct iov_iter *from) * to buffered IO in case we haven't made any progress. */ if (left == prev_left) { - err = -ENOTBLK; + ret = -ENOTBLK; } else { fault_in_iov_iter_readable(from, left); prev_left = left; @@ -1586,10 +1586,10 @@ static ssize_t btrfs_direct_write(struct kiocb *iocb, struct iov_iter *from) } /* - * If 'err' is -ENOTBLK or we have not written all data, then it means + * If 'ret' is -ENOTBLK or we have not written all data, then it means * we must fallback to buffered IO. */ - if ((err < 0 && err != -ENOTBLK) || !iov_iter_count(from)) + if ((ret < 0 && ret != -ENOTBLK) || !iov_iter_count(from)) goto out; buffered: @@ -1600,14 +1600,14 @@ static ssize_t btrfs_direct_write(struct kiocb *iocb, struct iov_iter *from) * below, we will block when flushing and waiting for the IO. */ if (iocb->ki_flags & IOCB_NOWAIT) { - err = -EAGAIN; + ret = -EAGAIN; goto out; } pos = iocb->ki_pos; written_buffered = btrfs_buffered_write(iocb, from); if (written_buffered < 0) { - err = written_buffered; + ret = written_buffered; goto out; } /* @@ -1615,18 +1615,18 @@ static ssize_t btrfs_direct_write(struct kiocb *iocb, struct iov_iter *from) * able to read what was just written. */ endbyte = pos + written_buffered - 1; - err = btrfs_fdatawrite_range(inode, pos, endbyte); - if (err) + ret = btrfs_fdatawrite_range(inode, pos, endbyte); + if (ret) goto out; - err = filemap_fdatawait_range(inode->i_mapping, pos, endbyte); - if (err) + ret = filemap_fdatawait_range(inode->i_mapping, pos, endbyte); + if (ret) goto out; written += written_buffered; iocb->ki_pos = pos + written_buffered; invalidate_mapping_pages(file->f_mapping, pos >> PAGE_SHIFT, endbyte >> PAGE_SHIFT); out: - return err < 0 ? err : written; + return ret < 0 ? ret : written; } static ssize_t btrfs_encoded_write(struct kiocb *iocb, struct iov_iter *from, From patchwork Tue Mar 19 14:55:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 13596759 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.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 306735F84F for ; Tue, 19 Mar 2024 14:59:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860360; cv=fail; b=tBNNFmnXqnB7m3e7zu8m4eGCNdeIZABmHo3djHj0FBDCMW8XdiZLg9dNx2O719aBV5KhTDud0K8NDqx8U6KST9YuzvdD6i1ZiVfLKMq+QdETOadFBPjeHO0uLZZusBaLixysGN8gbo/+RUnUSCqXThptiiVL3wrPJx+gQ+8Yk3M= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710860360; c=relaxed/simple; bh=KI0bfSu99hO0G6FxaD+r+3o+b/edGWEGsHxvTml2L4o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=FTc4r092C8Z24tExw4ssE58XSyJ3WtyeT1WgDBxoGiIyE5zMTpPFVTkRso+XNXkZoT2dPsXDFaDYlj/wlBoL1DLQ+pDz+KQkdflFNsaRTKE06Y+4yvGgI7Qm+zy5k+iWkP92Jc2iya9gzM2llUH4rECHXtWahKN9NDwzptRlBks= 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=dzkusPUB; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=cdeTLr49; arc=fail smtp.client-ip=205.220.177.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="dzkusPUB"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="cdeTLr49" Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 42JAIN4E020295 for ; Tue, 19 Mar 2024 14:59:18 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=+2y4LX2Tf84JVFYeAVFQ3TO9rIiVtkXK0X7oUdwqGUw=; b=dzkusPUBP3i0lbW8McuMSQJJfPJHnsJyWzAby74sSLEVo5yo2n8FPyy+DqPDGRO+rW0q 3ZTK7N2Y4RtRboEyMRK1PUbHuY8E5LhxeGasbFeAwGHGarnLrZZR6hN5Rlq8ZBmrqSBN 4qRlv0vI1EOAss3Qxjd+6DK6PcDxfRrzrVSyRwp9toyZUZJVsNoFA5dEESy6xO2jXNrH EPVA7ZHrgzlhVRhmemjZRp7r7zSqTBFHH3IWdv8sm5fAG0rMzd9pvogJ8X7cZ7oyNrNU OjdoHyR/m3p16TNQk9QaX4Y0Ptoe0D2Bz0ssVf94wykHbA6BnESiQ9VZRThASYGJUAhA VA== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ww3fcntq6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:59:17 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 42JDob1b003802 for ; Tue, 19 Mar 2024 14:59:17 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2101.outbound.protection.outlook.com [104.47.58.101]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ww1v6cagk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2024 14:59:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l97abukGAyL0DcBkzx2Uh6UfFtHec+XiigP7ZKiWEndf2ILXRcX5umQ2Ky0krsfW8q3Mvn+t5Lvlv0z3bRrCL80ADLXiDCi5wTZOPzLHXJ2veMmhpa/NdHLhYmpJhNXJVjbq2DgfC1q/8lPwaY6nCXyXFr1Bc/cOwywiWk811wveut1bweCUkdvWJdKViXonRjKfHG0WP0EW+jPc5PLDp6occymz548n2rwCw7Z973bEgRZlNoK8wse0FgMICvOsJokmWBT6U9LbCigIKI06o1II/jqCz8jqgVNYSwZ3NDTugzLaz0eTWIkNQvWNBQ6IulY4+OnYcqLn6MoMmT/fZQ== 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=+2y4LX2Tf84JVFYeAVFQ3TO9rIiVtkXK0X7oUdwqGUw=; b=UY68h8BtbJ1BICI2opgI7HTAGlzLc+CeZPb1/qQVlC5/vY3tvOjdaoKkYVwKDtxrgPUvPBATcgpLrKbi0vyuUdZx3njdS3/uGab6fP/v7cYWAz+fpNMkxC6LJTDGVP6oI4GqIvs9NObTNolRT6wFfK4u/4OVoY49A60lhisUT6rMNNwMe+iaqqSn3bsP4eA0beNzPqqlnuIYxYeSeEwo7alia7ePdcuIUnZcaM3sUWNznrxiLf0Dnieem+CR1PpwWODgF+ieLfQuTh73V5lJq8pU6DQ/PPB//DJBPDdAMeBamV1zvvjSIcnxtTqiESQeEZ6jmrsG6pafs20mQg78mQ== 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=+2y4LX2Tf84JVFYeAVFQ3TO9rIiVtkXK0X7oUdwqGUw=; b=cdeTLr495Z4HpLfPQuQqPZBO4Svc0hXV7YukxQfigvEVA0wuAMZXB5lEimnNMyjWY2avPFrFpLPNVDsqlGVJZgTRHTg3C1TT1k/8+SiL2X9oz0FSLy+MEXYzaXzlcotBFXNFmj4/Byg8KtwoWBE9YYB5Z1pXaNmNsXbehT/NlGw= Received: from PH0PR10MB5706.namprd10.prod.outlook.com (2603:10b6:510:148::10) by SA1PR10MB6543.namprd10.prod.outlook.com (2603:10b6:806:2bc::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.30; Tue, 19 Mar 2024 14:59:13 +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:59:13 +0000 From: Anand Jain To: linux-btrfs@vger.kernel.org Cc: Anand Jain Subject: [PATCH 29/29] btrfs: fixup_tree_root_location rename ret to ret2 and err to ret Date: Tue, 19 Mar 2024 20:25:37 +0530 Message-ID: X-Mailer: git-send-email 2.42.0 In-Reply-To: References: X-ClientProxiedBy: PN2PR01CA0079.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:23::24) 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_|SA1PR10MB6543:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: r07geEOIbGvaOdLDRbbjVKEf/FEH3XlJDNnvMMgitL9UHUrCYyz029v7HwbG2dZOQQK2kP3GWcR/k89kho2C2HEhQqUeOq5O2b9NKB85bDpXX+TSBXIJL81is3txA7FfI6P+saeEP6bRtcofGJDEOuqDzC5W6tqRdusTz9eu6fpNE4AS4Kp2JxeHHTd6GT1QfbP6Seith9HuceszYxw2yTuBCvNxuAe92+b8Grh+oUWFIZzK7qMlWya/tnGKdDeIqeG1zHPiqsX//8HOJo9Lizc4kwduTGPf/fdyFmsowB6KLjcMJUVe8jV4X+lU8I0QSXVKMwL8eFxQ/5qlUk3R50o0VnkSku/TYUVbp1xgvj0yAlmfIwIDguObiesurQEfD/e1HeWT08oIlJmstO3sT8XqGBBvDj+HsawuKeXgkOB9HNhl3kr1d/4Gv+uYhhuHW2j4xjuHyLPfNIf8JTVjiyhuON6ipDiAPk6WoYD1ehTfpZb5P6Vi+ZJB3PM9estq32opebg5FEkxX6blmgklJYkUyKLwxJrvCjT0nJO8PAC5LFDrKJvzMAKciLUjUwCgsUbqG54wqCXLgLNXqLpZUZpIasuYdwN4PlQTg+wLxqA2rogUiJEHmMr5BVlqQHsF/tNGGZDxGOA4EkUZ7bsvgnKbdMPBfNf6eHcrVM0sQT0= 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)(1800799015)(376005)(366007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: LNvo28GzRMrWq2YkOkAu5x5oJCO2iJ2OOiAzKIK5TfaQUx5E23VF3NOWd7I0fpAhZ+jo71Fje7LaRwXIV6H9hCI8ASj2Ev+7D/s0sH51FaEY0xveAMbH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wzv+8heDZFE9njshBt40Ktyp3NBImK/rZT+62y4Odb2gTFcUzpOlAv6L0+WHHRPr5cZKQ= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 772dfab0-e8ec-43c3-050b-08dc4825239b 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:59:13.1339 (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: tfzRsPmhtF/Wa7WW51nD2ZSjeltJhzTLVyBx10vXF1feuIN63do9O9816zEXd6L7HqWcbYCaSfVzj7UEugYziA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR10MB6543 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 mlxscore=0 adultscore=0 spamscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2403140000 definitions=main-2403190114 X-Proofpoint-GUID: 0wqJ7XXC7Q9r86-wy0bmRRLnCmQlbV_Z X-Proofpoint-ORIG-GUID: 0wqJ7XXC7Q9r86-wy0bmRRLnCmQlbV_Z Fix the code style for the return variable. First, rename ret to ret2, compile it, and then rename err to ret. This helps confirm that there are no instances of the old ret not renamed to ret2. Also, there is an opportunity to drop the initialization of ret to 0, with the first use of ret2 replaced with ret. However, due to the confusing git-diff, I refrain from doing that as of now. Signed-off-by: Anand Jain --- fs/btrfs/inode.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 952c92e6dfcf..d890cb5ab548 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -5443,29 +5443,29 @@ static int fixup_tree_root_location(struct btrfs_fs_info *fs_info, struct btrfs_root_ref *ref; struct extent_buffer *leaf; struct btrfs_key key; - int ret; - int err = 0; + int ret2; + int ret = 0; struct fscrypt_name fname; - ret = fscrypt_setup_filename(&dir->vfs_inode, &dentry->d_name, 0, &fname); - if (ret) - return ret; + ret2 = fscrypt_setup_filename(&dir->vfs_inode, &dentry->d_name, 0, &fname); + if (ret2) + return ret2; path = btrfs_alloc_path(); if (!path) { - err = -ENOMEM; + ret = -ENOMEM; goto out; } - err = -ENOENT; + ret = -ENOENT; key.objectid = dir->root->root_key.objectid; key.type = BTRFS_ROOT_REF_KEY; key.offset = location->objectid; - ret = btrfs_search_slot(NULL, fs_info->tree_root, &key, path, 0, 0); - if (ret) { - if (ret < 0) - err = ret; + ret2 = btrfs_search_slot(NULL, fs_info->tree_root, &key, path, 0, 0); + if (ret2) { + if (ret2 < 0) + ret = ret2; goto out; } @@ -5475,16 +5475,16 @@ static int fixup_tree_root_location(struct btrfs_fs_info *fs_info, btrfs_root_ref_name_len(leaf, ref) != fname.disk_name.len) goto out; - ret = memcmp_extent_buffer(leaf, fname.disk_name.name, + ret2 = memcmp_extent_buffer(leaf, fname.disk_name.name, (unsigned long)(ref + 1), fname.disk_name.len); - if (ret) + if (ret2) goto out; btrfs_release_path(path); new_root = btrfs_get_fs_root(fs_info, location->objectid, true); if (IS_ERR(new_root)) { - err = PTR_ERR(new_root); + ret = PTR_ERR(new_root); goto out; } @@ -5492,11 +5492,11 @@ static int fixup_tree_root_location(struct btrfs_fs_info *fs_info, location->objectid = btrfs_root_dirid(&new_root->root_item); location->type = BTRFS_INODE_ITEM_KEY; location->offset = 0; - err = 0; + ret = 0; out: btrfs_free_path(path); fscrypt_free_filename(&fname); - return err; + return ret; } static void inode_tree_add(struct btrfs_inode *inode)