diff options
author | Kent Overstreet <kmo@daterainc.com> | 2013-07-31 09:03:54 +0200 |
---|---|---|
committer | Kent Overstreet <kmo@daterainc.com> | 2013-11-11 06:56:40 +0100 |
commit | 65d22e911bfc4f46cda4751f1b1926b43c316c14 (patch) | |
tree | 2d860067f2cb0d25a3fda0b9d3873d911ce364fe /drivers/md/bcache/bset.c | |
parent | bcache: Kill sequential_merge option (diff) | |
download | linux-65d22e911bfc4f46cda4751f1b1926b43c316c14.tar.xz linux-65d22e911bfc4f46cda4751f1b1926b43c316c14.zip |
bcache: Move spinlock into struct time_stats
Minor cleanup.
Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Diffstat (limited to 'drivers/md/bcache/bset.c')
-rw-r--r-- | drivers/md/bcache/bset.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/md/bcache/bset.c b/drivers/md/bcache/bset.c index b0fe0dc59ee6..14573391206b 100644 --- a/drivers/md/bcache/bset.c +++ b/drivers/md/bcache/bset.c @@ -1077,11 +1077,8 @@ static void __btree_sort(struct btree *b, struct btree_iter *iter, if (b->written) bset_build_written_tree(b); - if (!start) { - spin_lock(&b->c->sort_time_lock); + if (!start) bch_time_stats_update(&b->c->sort_time, start_time); - spin_unlock(&b->c->sort_time_lock); - } } void bch_btree_sort_partial(struct btree *b, unsigned start) @@ -1128,9 +1125,7 @@ void bch_btree_sort_into(struct btree *b, struct btree *new) btree_mergesort(b, new->sets->data, &iter, false, true); - spin_lock(&b->c->sort_time_lock); bch_time_stats_update(&b->c->sort_time, start_time); - spin_unlock(&b->c->sort_time_lock); bkey_copy_key(&new->key, &b->key); new->sets->size = 0; |