Home Home > GIT Browse > SLE12-SP3
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2019-05-17 15:23:00 +0800
committerQu Wenruo <wqu@suse.com>2019-05-17 15:23:00 +0800
commit2185732a267ede1d63d1a67e8ca0e9d5ab662fab (patch)
treea3865688ff0a9342285aeaf2e2f309573a447d42
parent692f5d3d07f7b46becb4e40c2a739769c72b1063 (diff)
btrfs: move ref_mod modification into the if (ref) logic
(bsc#1134813). suse-commit: d41af4370f1811cc42551b65b90b74344cb3a8bd
-rw-r--r--fs/btrfs/extent-tree.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index e1dbf2149209..d0ccd6ae05f3 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -2666,10 +2666,6 @@ static noinline int __btrfs_run_delayed_refs(struct btrfs_trans_handle *trans,
list_del(&ref->list);
if (!list_empty(&ref->add_list))
list_del(&ref->add_list);
- }
- atomic_dec(&delayed_refs->num_entries);
-
- if (!btrfs_delayed_ref_is_head(ref)) {
/*
* when we play the delayed ref, also correct the
* ref_mod on head
@@ -2686,6 +2682,8 @@ static noinline int __btrfs_run_delayed_refs(struct btrfs_trans_handle *trans,
WARN_ON(1);
}
}
+ atomic_dec(&delayed_refs->num_entries);
+
/*
* Record the must-insert_reserved flag before we drop the spin
* lock.