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); From patchwork Sat Dec 31 18:47:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhartha Menon X-Patchwork-Id: 13086164 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 22379C3DA7D for ; Sat, 31 Dec 2022 18:49:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231818AbiLaSsf (ORCPT ); Sat, 31 Dec 2022 13:48:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229595AbiLaSsd (ORCPT ); Sat, 31 Dec 2022 13:48:33 -0500 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03olkn2106.outbound.protection.outlook.com [40.92.59.106]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4944D2642 for ; Sat, 31 Dec 2022 10:48:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PAojLTQDE02i4D81bXTkTUpgOc6viNdt817PTLTbdE2/so9szZBl5Vhmyp+W59GMH4FIE5Rm9REIv2nuq75mqxgXMsBn0wY+JBjRbEJPeym/o+0U030ntO2wk34Fmai+Abvmf2BmDdAvwQX1LKBbKB11HM5AbgnNpBZAFVmXWSOZy8FTFs4TKwGVdNpE8DsIyGr1tl7zWleRxCbew+ydfHf0EYhaDiNapvP/2JpDCxQAmtAKHAOXhjrherBhUAQtFctz5xsKXvoEMfnMkXOT08zG9JMXPzbZJc8pw88szTXDbwDqQISSp/I7PsfJwQeLqok6em/KWGiJrJPEAPtWXw== 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=eQtFfNU2Yrw+nv2dZmFcezTLoBq7hNXndLEt2JkD9fE=; b=Q2npsCz/O6TgFG8XJaLfsElnD7BoyWqwQgjixl8hyZYSYUu85UeKObRLEADCKvMjohZsx+a7TZJDpdnXyNyAs75waIZF6u2YNic0L2mSFKA011I88NrP9AIqbd8o6FkOn7C7svaBHPBp2njL1jn8aUoKPPnnJHq4NCAVx3rht9bHpaxLhsqQvMz/YnZyOSP6MH8qKhwSYQVst/9ueCxmjy5aUumdLjRvU0mkCIZgPFafgxr5MK5lu0XAD2OfN6l+th9fVffyCRMuruCqtu13MqNVP/DnRV9UdIZoLYbjV2UFl2qqK6LQe6EDc21lK57M5MdiTvwKhmkVaKr0bISvsA== 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=eQtFfNU2Yrw+nv2dZmFcezTLoBq7hNXndLEt2JkD9fE=; b=br6fKmvhv7UNUDE2pE+jb0u1lKuAuFlmgpB+QZrrbyMX4yHJtRb+01mwZmNAv1AOctwaKkXq4KX4oMxkDKktGgtg5nbyZEPvf2WUqupucqfcwvvBRRaRMrM60D1Vz4cFDXvnpj7g/mlWkuy8pJfP3xfKFu40OHsC7UAgcpGIq6dxoEpItRiaNtzATF+jbBveYxursOKSzFOa0zZSYpNIUMljrCRwjTQEUIQYBld1QEUvdYLQvpnwO47kFEFl1prAQRX6cUz0LpbhbMXQIozreDOf4k8MjXwskSV5VU9CLSKDjrWXDHmuxq2r/B36YteCgFAqxb6GtF3N7bC7jE7wUw== 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:28 +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:28 +0000 From: Siddhartha Menon To: linux-btrfs@vger.kernel.org Cc: clm@fb.com, josef@toxicpanda.com, dsterba@suse.com, Siddhartha Menon Subject: [PATCH 2/2] Fix several style errors in fs/btrfs/inode.c Date: Sat, 31 Dec 2022 18:47:49 +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: [CcgRbr83s8UVkqmYdLIiYl0dfHOwKke2] 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-3-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: 27b18b7b-4900-4323-c5e4-08daeb5f9acf X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmrKhIkblLwoAe06Ob0ImJmXIGoqjRnYd79pKjFeyxdDxLZJ9h+LgCUhbDNM+srMN3vy+tXClQlyx22ItrL6pH1TyUp9dilC57a/Z4HGlnuRQ+lCdJIaoafk9ykR0zeQLIgsBmt0FqL/6oVzKTM4vCB2uuZ3leSd0fkmydblum4ItHf0GxLG3Zwxh6lMao+F3fPeDSCLVvbeI6nOhrwVnMOK5HegpQuNXTFQGKMibuqrr/kE8YTM18Ci4+GfeoFzbgIxYcR7FZxhVdKx+bf6gBagQkGypZQzruux1IFMYrTaXPaDpVaY/IT3deS8hjunyWPXC4ZCaFw0wWRQX+hiPIvV2gYLknXjDG7rpbIjl5jYkMj4ohPw/QJK4CLfwYLHj9I29zRvtKg/yEH21gRFqldoctBIxoAjoL4iSQPis7iFpa0czv0ZsHH4EZD2DmFCwrq+HT/b/sBzpjVs+n+lmSCBZa9hCXky67tS5bhp+UZfMNYCeJud+7sbhcFs0kklEdRqmaDn+GjoOuwnTdVXQ5on+tUuQn4N+pU0DChIYXG9scZIOI04BL2p6Mm9F1r6bpI+yo3phAjuIyHhJKTypyUMrXlPgogOWW0R7VhKhn8ZVPnDVMFmdB+gKILWiNGQieoHHmtfJLtQS+vcDF3Dt4DWHxRFDgMneDbE2tDGTdSIOEGz1QCb605v76cMjcPLcIm1j8OOJAqbMvbRLIIZzIs05rQFKiRjjP960dVwdoH3haj5HKV0/lifTd/P46hKgLo= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 92Z0RbFay900UOSo/0Q8vIRexrXhb2Bmw5BJMtWHYXzEWBGWpLr39ZE4+YRrUBOOh4ebjNnVcLaBqRulgMb7cHrhLR1K7jq16YuUBQkPdM4HPrPCevtR8D/HUft05aDwlf4MvTyAvPDDY7T8crT3OENkcYP3WkVNGUjCtZEVEvCE4d+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uvSLDXY+tcVZV/hC4W/OcEIRiOV/lc6CP0mm1+79JMLkQhw0vG2LD5rrvucM72erjtV9GBvO33S0OfZg8A0b2EXiigutuSHQWTtCx0XF0WLa017IqKDQCJitcBsw1VRWPDEbnZtRQo1XVa78xTQZCEJBtTDplUj0IrfHQKpY8OqjHbylmcpuJV+Il1KLeAXrZheSGyd6O8hHjzXgVTWc3dX9vHDjd8CmkPgUEclpReLK3UrxD0iY/w4DUdlFa8DPcdc0atS6r1Eika857ZwpVHRs3qFCLl8NWLXaitrn8bAxAzH4QKHKvKIbo7ZKziRe7X3ChPTvm0ObhSi2CfZ5nQaz4sY7MFEA8UZfPJ/iAcsn9kzHAUDdq5/d+7bGnD1+bvIVJY5Vi8TBpziuRSvTwZiXC9MaXDn/eJtWYoMJsXxdfJ9Y+SLOIgtGcJyFbrvtI+uJvpWL9yF6Keh9lvz4tj8XBGAje1C3tshI8xM7PLFcvV+gfy6epkR1zHjqmfiDVLN9jvc/hDcK5usjTR1AzPRpjblauXUB3stp1pUv44lA3rceDtTNGgQlZ4b+mORJ6sL3PeOwhsruS4UUFgASiIEZitOWiNvhLgDFUh3LV+pS8cohcCuG6gTL5/S4VUxCsVmQ0oncT6t1bpNUzAgqs9ihDwdOqJEeA+0mqILoT+7kCOUzEsIzAu6ec3U61LV9Hi8Qhaj9Zj/UYvdrsbIAaK6XxMu7B0LSMVHQpzXpuHY/2kS3B8rSSvQXsMqWrMjOojEXk7XU5DbXgFyy911RgnqbRFiAHTCgIeg= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 27b18b7b-4900-4323-c5e4-08daeb5f9acf 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:27.9949 (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 | 49 +++++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index cb95d47e4d02..ee7ca0e69aa1 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -366,6 +366,7 @@ static int insert_inline_extent(struct btrfs_trans_handle *trans, if (compress_type != BTRFS_COMPRESS_NONE) { struct page *cpage; int i = 0; + while (compressed_size > 0) { cpage = compressed_pages[i]; cur_size = min_t(unsigned long, compressed_size, @@ -1221,7 +1222,7 @@ static noinline int cow_file_range(struct btrfs_inode *inode, u64 blocksize = fs_info->sectorsize; struct btrfs_key ins; struct extent_map *em; - unsigned clear_bits; + unsigned int clear_bits; unsigned long page_ops; bool extent_reserved = false; int ret = 0; @@ -1557,7 +1558,7 @@ static int cow_file_range_async(struct btrfs_inode *inode, u64 num_chunks = DIV_ROUND_UP(end - start, SZ_512K); int i; bool should_compress; - unsigned nofs_flag; + unsigned int nofs_flag; const blk_opf_t write_flags = wbc_to_write_flags(wbc); unlock_extent(&inode->io_tree, start, end, NULL); @@ -1575,7 +1576,7 @@ static int cow_file_range_async(struct btrfs_inode *inode, memalloc_nofs_restore(nofs_flag); if (!ctx) { - unsigned clear_bits = EXTENT_LOCKED | EXTENT_DELALLOC | + unsigned int clear_bits = EXTENT_LOCKED | EXTENT_DELALLOC | EXTENT_DELALLOC_NEW | EXTENT_DEFRAG | EXTENT_DO_ACCOUNTING; unsigned long page_ops = PAGE_UNLOCK | PAGE_START_WRITEBACK | @@ -3846,7 +3847,7 @@ int btrfs_orphan_cleanup(struct btrfs_root *root) ret = PTR_ERR(trans); goto out; } - btrfs_debug(fs_info, "auto deleting %Lu", + btrfs_debug(fs_info, "auto deleting %llu", found_key.objectid); ret = btrfs_del_orphan_item(trans, root, found_key.objectid); @@ -3892,8 +3893,8 @@ static noinline int acls_after_inode_item(struct extent_buffer *leaf, { u32 nritems = btrfs_header_nritems(leaf); struct btrfs_key found_key; - static u64 xattr_access = 0; - static u64 xattr_default = 0; + static u64 xattr_access; + static u64 xattr_default; int scanned = 0; if (!xattr_access) { @@ -4920,7 +4921,7 @@ int btrfs_truncate_block(struct btrfs_inode *inode, loff_t from, loff_t len, bool only_release_metadata = false; u32 blocksize = fs_info->sectorsize; pgoff_t index = from >> PAGE_SHIFT; - unsigned offset = from & (blocksize - 1); + unsigned int offset = from & (blocksize - 1); struct page *page; gfp_t mask = btrfs_alloc_write_mask(mapping); size_t write_bytes = blocksize; @@ -5358,7 +5359,7 @@ static void evict_inode_truncate_pages(struct inode *inode) struct extent_state *cached_state = NULL; u64 start; u64 end; - unsigned state_flags; + unsigned int state_flags; node = rb_first(&io_tree->state); state = rb_entry(node, struct extent_state, rb_node); @@ -5842,7 +5843,7 @@ static struct inode *new_simple_dir(struct super_block *s, inode->i_op = &simple_dir_inode_operations; inode->i_opflags &= ~IOP_XATTR; inode->i_fop = &simple_dir_operations; - inode->i_mode = S_IFDIR | S_IRUGO | S_IWUSR | S_IXUGO; + inode->i_mode = 0755; inode->i_mtime = current_time(inode); inode->i_atime = inode->i_mtime; inode->i_ctime = inode->i_mtime; @@ -5983,7 +5984,7 @@ static int btrfs_opendir(struct inode *inode, struct file *file) struct dir_entry { u64 ino; u64 offset; - unsigned type; + unsigned int type; int name_len; }; @@ -6667,9 +6668,11 @@ int btrfs_add_link(struct btrfs_trans_handle *trans, if (unlikely(ino == BTRFS_FIRST_FREE_OBJECTID)) { u64 local_index; int err; + err = btrfs_del_root_ref(trans, key.objectid, root->root_key.objectid, parent_ino, &local_index, name); + if (err) btrfs_abort_transaction(trans, err); } else if (add_backref) { @@ -8930,20 +8933,20 @@ void btrfs_destroy_inode(struct inode *vfs_inode) while (1) { ordered = btrfs_lookup_first_ordered_extent(inode, (u64)-1); + if (!ordered) break; - else { - btrfs_err(root->fs_info, - "found ordered extent %llu %llu on inode cleanup", - ordered->file_offset, ordered->num_bytes); - if (!freespace_inode) - btrfs_lockdep_acquire(root->fs_info, btrfs_ordered_extent); + btrfs_err(root->fs_info, + "found ordered extent %llu %llu on inode cleanup", + ordered->file_offset, ordered->num_bytes); - btrfs_remove_ordered_extent(inode, ordered); - btrfs_put_ordered_extent(ordered); - btrfs_put_ordered_extent(ordered); - } + if (!freespace_inode) + btrfs_lockdep_acquire(root->fs_info, btrfs_ordered_extent); + + btrfs_remove_ordered_extent(inode, ordered); + btrfs_put_ordered_extent(ordered); + btrfs_put_ordered_extent(ordered); } btrfs_qgroup_check_reserved_leak(inode); inode_tree_del(inode); @@ -9357,10 +9360,10 @@ static int btrfs_rename(struct user_namespace *mnt_userns, if (ret) { if (ret == -EEXIST) { /* we shouldn't get - * eexist without a new_inode */ - if (WARN_ON(!new_inode)) { + * eexist without a new_inode + */ + if (WARN_ON(!new_inode)) goto out_fscrypt_names; - } } else { /* maybe -EOVERFLOW */ goto out_fscrypt_names;