From patchwork Sat Dec 31 18:47:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhartha Menon X-Patchwork-Id: 13086163 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 10CDBC3DA7A for ; Sat, 31 Dec 2022 18:49:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231693AbiLaSsY (ORCPT ); Sat, 31 Dec 2022 13:48:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229595AbiLaSsX (ORCPT ); Sat, 31 Dec 2022 13:48:23 -0500 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03olkn2031.outbound.protection.outlook.com [40.92.59.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 610006349 for ; Sat, 31 Dec 2022 10:48:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d0RvW136OkdOPzn8YHafOrv2nO5EA2NRPvY1PTZEutkQ0reGLCr6mcZMAD/z4BVQZZNo/AqR6/qR41uCQJwfhFF/GeK/sI3udgVptnobai1OkDQE6LIXsuzzPxxrugWWmHlonixiO2aNylGJmezEVS//NqZJ+advkUizGYsG7a5XJJVDQcAlp2eykyPjgWDCAj2ZPn7xX3nfZKWqFyq20NGIVnWT5hIo21WCYF0SiHmcYXPh2Pdx1N7GgK6MP+vgWFK5LMtVGh4ettdKJuveaiAtXbep4nMhA9PaidcfC/2QYfPxbUpTpKj+IAEiZkg+wmb3xrZ7O0szuVMPCfvuOQ== 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=KAD6o06JvHumX636p/APQvcqNMPQlwsWssSXZaiD9Lc=; b=d5W5BLtMjXqRc5n9kfCsFTS6TSPBQ1/meb1yuFakbi6dBOSTyqwrDSzv4WpnfSMyEjcO6/CcarHJIiAhhKp5prO7hFdfvXXUmpiTW2qF4wumHPMUYRr8+w8wrAZ4lxXdf4kN6jIVLCXPNEapmLCSGYrGzn2TDvzSKeztoipXdvdF4VrlL2dfo+qeLEkdGdY8U55wz2f0AYdYmxD6+nZl7oGMJfSDOXOXD0UZQRgeW+VdIfORWHUW2FMvVIzR2nbTOVtShIn08hS5bAUo1/zhNaaUBJ7tA6fUNjdhdNyOdq5RKOqRmDygBnTCeHhxOOtZettuM+ZWHPagDnlNa+Br/A== 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=KAD6o06JvHumX636p/APQvcqNMPQlwsWssSXZaiD9Lc=; b=oojN8zG5TQnyWmz6P5Z5icWzaIARC+hG0OScMKOgsDtXSfYe36PyGl215opvquKdn2QoG7mcAoAPbI12Cx3bQxby/gZDgYdPdDB4g0MyDpBi/Xzrx9dPUaXnnA1Kowev1gy/a4MPt5I55CMh6saM0hK9IyKe2abI4CBHHJXx0ammRlEaTg3wRy9RTiLeNG5H0fOF3ljN2MkLXkEiqYgMyMrHxGXxvXyE4xstqVMXtPh9JamhuZ5opr1YRK+RB2zZwYUGliwwXMd8BVBiImOubeMapMIKPVHyFFwZpOsdoSC67QerRbynhPQcTZHFPyI2N0LNG63qCrX6JcG/WMzP3Q== 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:48:18 +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:48:18 +0000 From: Siddhartha Menon To: linux-btrfs@vger.kernel.org Cc: clm@fb.com, josef@toxicpanda.com, dsterba@suse.com, Siddhartha Menon Subject: [PATCH 1/2] Check return value of unpin_exten_cache Date: Sat, 31 Dec 2022 18:47:48 +0000 Message-ID: X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221231184749.28896-1-siddharthamenon@outlook.com> References: <20221231184749.28896-1-siddharthamenon@outlook.com> X-TMN: [UNNSwXfa2PZUQbs35L1bYov3qNBS70/k] 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-2-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: 7fdb427b-ef17-49f5-dbf3-08daeb5f94fd X-MS-Exchange-SLBlob-MailProps: EgT5Wr3QDKyQOi1MZNPcWvWmpE5rgqxSoF3mMVwdqAAVgKaz80A2JBSV/vm10yF5cFyTga2JhXd7IGL8LMQHUIZfBS0+vDNxgUmsBBNt8AO4V5gYfeYQ7gSo8GBakzINVmmUp0GIELMloT5Ak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Qrd7uzJrPxF97s0jUna2eikKe1BKKFgV8V76r2FUwWWg8CyWW/GJj9gcCTqNdaYgt08QZDrCY/3lrhJH+sGl7T29TNJQInquJ44xlXO9jeIjVnCRKjVMEmg96mLT6N1NqTmhnLQYnXudw0ZVFx7lfBJVU+Uoghp9jSSoDkAcesnOvMDJi0m0nFKJPPg6sb8gg+ndpfApm4a/DC+8zwh3rEzJNp8+b4A7EKKoDi+tKizYAsvPX5HqalkY3SL1ZI4EKEG4w93OP0h2hlWI+HlPvBkaxx7vm8ALhelpGZ3mWa1BGSEoPIFsYTTu5oXBSA/31gXFc16SkohOBWy1A8M1iLjMelmoGN6LWw5iLS6zrxmLZs5SC9P58O7PnFzG4e3dM0gbn+I3uD6Of1oHC5wBJBGkLluCUFKMsM7V1mrcEXkVyDTta6avIfLyp1RVS3qatec7V16cmFqFMvK2hSN2khuOS9GVlZ2m9ohtb76EhaZDXXt+CcHNP3TtU2z89kUq+U7g2CKvx18X8A= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7fdb427b-ef17-49f5-dbf3-08daeb5f94fd 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:48:18.2150 (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 Signed-off-by: Siddhartha Menon --- fs/btrfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 8bcad9940154..cb95d47e4d02 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -3331,7 +3331,7 @@ int btrfs_finish_ordered_io(struct btrfs_ordered_extent *ordered_extent) ordered_extent->disk_num_bytes); } } - unpin_extent_cache(&inode->extent_tree, ordered_extent->file_offset, + ret = unpin_extent_cache(&inode->extent_tree, ordered_extent->file_offset, ordered_extent->num_bytes, trans->transid); if (ret < 0) { btrfs_abort_transaction(trans, ret);