From patchwork Thu Aug 30 17:42:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 10582475 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 327C217DE for ; Thu, 30 Aug 2018 17:43:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 21F3E284DA for ; Thu, 30 Aug 2018 17:43:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1642328676; Thu, 30 Aug 2018 17:43:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE8EA284DA for ; Thu, 30 Aug 2018 17:43:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727713AbeH3Vqb (ORCPT ); Thu, 30 Aug 2018 17:46:31 -0400 Received: from mail-qt0-f193.google.com ([209.85.216.193]:44455 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726878AbeH3Vqb (ORCPT ); Thu, 30 Aug 2018 17:46:31 -0400 Received: by mail-qt0-f193.google.com with SMTP id k38-v6so11284966qtk.11 for ; Thu, 30 Aug 2018 10:43:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=rWvLztEWJyWKHy/ruHqdFw5Y+kzYhdUJU97N+CsRy/Y=; b=vOMyB7JVVI7y+ZsN/SNbStsmZ6Qq3hTV2v05dvggDNxQmIwMO+R3+goDE+Lg2E+75c KVpKLLumPA/FwAbI67udBTa6rP9uC0kOjtpBmFvAwPOHoQof5BKoJWz5UVBu/VFeqKcb grgJIOiDND+FbRAxBqMophJx8Rb65njmiwRJVE5F6fWoO4sZ93aHWmdApzxuu/fkX+tQ /uuORyextSVysrs3u3DO11HWy0vhzdlnuQJzo4nVAIKckD2IKk3ubNcDoH/JByuDhi06 SX5aoQ/Q2fMHleZtvackIj4EGTLTRPpcYHqgM/Z0T1Eunkh3/mNqnSAS7/T1Ch/EhuXu nu7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=rWvLztEWJyWKHy/ruHqdFw5Y+kzYhdUJU97N+CsRy/Y=; b=UIBZbWvyD/JdYAiy/VmTekJ5a9D18JkbdTsYwj42WpB7sC4TtuVXx9qTcyuzAn25fP IToeHM1oZpF0Mt5Ax6JlcmaGWqNYkaYup2xYLqit2p2F338nilnj+gR9+zgaEbpAZyjU 3QLWenPagrkodr+/HWu7+P2ZP31fQyQkdsmPvvF/ePMUdwiY496yTIv9PvxV9ue7kikc vjClPlWhwngvq3IO0uA/dgGx1HQd0jtXKTfqVACv4SgbwkeyW8YynKlPFIKceWrUO3+a MW88KOLovHIW0QLXMrvsa807fy9REhYQQsofXORhmFedIJ1q98BwByUHkXl/0dpptJvd aZDA== X-Gm-Message-State: APzg51C6vNI+jVA0GPxesmx+LyvU9u8Z+0xV1tC35pGjEI66KAh0U8Sb lZvSyo2GCZPAlqWizJotnYF4T9fJAcHHFw== X-Google-Smtp-Source: ANB0VdbEJLeOh+clTMX8v2S6xVGkCDt0jgP+6+Usow7wcjgTpwMzDNYaeCO5XX0XcnsLeTd45wFr4g== X-Received: by 2002:ac8:8e8:: with SMTP id y37-v6mr13106504qth.339.1535650995349; Thu, 30 Aug 2018 10:43:15 -0700 (PDT) Received: from localhost ([107.15.81.208]) by smtp.gmail.com with ESMTPSA id l23-v6sm4879700qta.30.2018.08.30.10.43.14 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 30 Aug 2018 10:43:14 -0700 (PDT) From: Josef Bacik To: linux-btrfs@vger.kernel.org Subject: [PATCH 26/35] btrfs: make btrfs_destroy_delayed_refs use btrfs_delete_ref_head Date: Thu, 30 Aug 2018 13:42:16 -0400 Message-Id: <20180830174225.2200-27-josef@toxicpanda.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180830174225.2200-1-josef@toxicpanda.com> References: <20180830174225.2200-1-josef@toxicpanda.com> Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Instead of open coding this stuff use the helper instead. Signed-off-by: Josef Bacik Reviewed-by: Nikolay Borisov --- fs/btrfs/disk-io.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index c72ab2ca7627..1d3f5731d616 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -4232,12 +4232,7 @@ static int btrfs_destroy_delayed_refs(struct btrfs_transaction *trans, if (head->must_insert_reserved) pin_bytes = true; btrfs_free_delayed_extent_op(head->extent_op); - delayed_refs->num_heads--; - if (head->processing == 0) - delayed_refs->num_heads_ready--; - atomic_dec(&delayed_refs->num_entries); - rb_erase(&head->href_node, &delayed_refs->href_root); - RB_CLEAR_NODE(&head->href_node); + btrfs_delete_ref_head(delayed_refs, head); spin_unlock(&head->lock); spin_unlock(&delayed_refs->lock); mutex_unlock(&head->mutex);