From patchwork Sat Dec 31 18:47:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhartha Menon X-Patchwork-Id: 13086162 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C556C4332F for ; Sat, 31 Dec 2022 18:48:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231431AbiLaSsC (ORCPT ); Sat, 31 Dec 2022 13:48:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229595AbiLaSsB (ORCPT ); Sat, 31 Dec 2022 13:48:01 -0500 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03olkn2082.outbound.protection.outlook.com [40.92.59.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 775442642 for ; Sat, 31 Dec 2022 10:47:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TwVTCqRnwnI/cVSClmQ1jqh2FA5V1NdRtXkqaJ6ZPzQ4hZNnxugU0WhySv7SDIG32CS0jw+EOo0KBqRT4oM/AH7vNfIbO6NV7etGK7B/0LVoFJuTwLREVO+9c2z8Av+zoG1vNoUZ8BaMx4LaRu82tAk/UDH9cFvYAIA24q9B+Sa1GsXJP/4m/deb48LY3VziE66Dy5cWfBLRWiYRuujfVGptQnXbfGq/RT3PZylz1iXx9w7nOQ4FUSyKxqh6ED4UBjUW+08swxTB1CizXnPS+rwqbkM6Vy3wS/eYBr5pD28FbtkURuWHVTiTrLDKUYtXFnOn6K+zJNqhoQGiVidH6A== 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=bWHfFoWJDVp+UhAoDC7LT9jtU74uhTewA7zlaUVxos8=; b=EVPgHE0KmDDCEp4Tp1ktOFEmLDtkE2gDmFzT87hC8hutQKGY0mTCciJZgqXteMqa5gcmtigEuWPPhqnYvJYI8NCzWM98N4g1PLECyTQBlj8/DsJfXSmpYPaPEkHLg9Ug8U2NAv6oFxFGLc8o6xmtcSvtU3HMZ85TuL6N3BdHGzaumd+jCGjxUdET9dxEoZqn1abjPnRx8Pkxk9wZMRB8VzwRXj03lAakC2NC6u+guaOJSONb7yIQ8/nc/ybPsPiMyZ4R6uURNKflGeueOjyQ+DefVGJeP8o4ENPJokg+PCqnfZcxU9Cr63P4hDJDgHaXjuNSopKCrVQXD5M5TdVEhw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bWHfFoWJDVp+UhAoDC7LT9jtU74uhTewA7zlaUVxos8=; b=A1HHfAV858YuAli4QiVZkxfHPhQnWBaehwCp4QNQioEopWIo4UBYs4xqCHTs2oWY9+WnF79BhwY2qtWzP+3MhaOpGphXPD7E3eEe/gdNcfEVh/KH20RQw7FM1dc+0a/fIvMZgjUCalqYv7llM4c+go3shWWHFJiGXDUqYNOZa2HwF5SiUwqWZr9Z7KdEEyXDxo/7rf4QdYcgckXttcS5BE5GsAja0HZyOP8SMerQFu2V1LwQo3cc16Plb8Nb41ti3nbfHIeQlRGt2/E4AxRuAzXQi2+Jw9EX8bmekg++vCtoNMPGOftIHlPo6jpbNc78b9QiqRea4D+jFCdmvSBexw== Received: from PAXP193MB2089.EURP193.PROD.OUTLOOK.COM (2603:10a6:102:226::18) by GV1P193MB2277.EURP193.PROD.OUTLOOK.COM (2603:10a6:150:28::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.16; Sat, 31 Dec 2022 18:47:57 +0000 Received: from PAXP193MB2089.EURP193.PROD.OUTLOOK.COM ([fe80::9da1:872b:caa3:1379]) by PAXP193MB2089.EURP193.PROD.OUTLOOK.COM ([fe80::9da1:872b:caa3:1379%5]) with mapi id 15.20.5944.018; Sat, 31 Dec 2022 18:47:57 +0000 From: Siddhartha Menon To: linux-btrfs@vger.kernel.org Cc: clm@fb.com, josef@toxicpanda.com, dsterba@suse.com, Siddhartha Menon Subject: [PATCH 0/2] Check the return value of unpin_exten_cache. Cleanup style. Date: Sat, 31 Dec 2022 18:47:47 +0000 Message-ID: X-Mailer: git-send-email 2.39.0 X-TMN: [qEn1IIMvUo9Gg3BL9lB/+oWV6ppbaE7+] X-ClientProxiedBy: LNXP265CA0083.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:76::23) To PAXP193MB2089.EURP193.PROD.OUTLOOK.COM (2603:10a6:102:226::18) X-Microsoft-Original-Message-ID: <20221231184749.28896-1-siddharthamenon@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXP193MB2089:EE_|GV1P193MB2277:EE_ X-MS-Office365-Filtering-Correlation-Id: d03b02e8-e1ad-4575-f290-08daeb5f8877 X-MS-Exchange-SLBlob-MailProps: znQPCv1HvwVdpFgLlmRDKutfW2ESK+VMUhtdnTWgTjNt4/4TS0zwAxj7RuNO/6vcwEOxw40EPrY/Dghs1lXFkMTfNLiS7KzgnpIg5JSPU+JLhT9EJWokVtrduPJ84ejFkOXZXjS7Q8dDhP4QpwfOMFu96thzA6ZEwhKfrumTvYihToy1Jb9NmW52iEe7YrESVk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V1010PGGbTa3JV9aLn+dYVljmzF+NdZoiXxb0+WtRyGE4lli9r0w/1Kk0erSeyyEOyUbHi3W9UZzQJKz4/eCAT0acBh/aTCoCo6KmdAftcpxKI/8ldIYA5dNKIB0GY6VHI368ARQ7ngCW/W7jTK0iD7lD4Bq5oEV2ozf3C+SGqBMKSybwNNiZv75wdwi0dxm6wEj9n7GJuNclQaHsjGCSyyii4wNE3fKoDFsWKLSmi1miExUYAsyftv5VzidIhilhPHNyIRMWUS6+I21d3feUsY/PGagHxdD7i9/AFE58AEgLJFcK5RJ4l/pIGSOBE//k6iBijJwtUgoM6WRs49avT56znBxu5QJ3dU/JHpXcEwKD9BCsAKdWBwaomXjIAoO0fwPXni/TNYizrOO+nr3TLLeXgwOmmA1XLjOoBJeV8mstoRdrJPyH/mVnYRQ4bGkEHRQzkYTPtocMZXoZprZLBY9QSzy79bIkKGuHbN0963R2CqUmZdtnrb/U2TA5wSBk= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d03b02e8-e1ad-4575-f290-08daeb5f8877 X-MS-Exchange-CrossTenant-AuthSource: PAXP193MB2089.EURP193.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Dec 2022 18:47:57.2203 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1P193MB2277 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org These patches hopefully fix a bug and cleanup the style. It seems that in inode.c:3335 the function `unpin_exten_cache` is called but it's return value is not saved. Therefore the following if statement is checking an old value of `ret`. Siddhartha Menon (2): Check return value of unpin_exten_cache Fix several style errors in fs/btrfs/inode.c fs/btrfs/inode.c | 51 +++++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 24 deletions(-)