diff options
author | Kent Overstreet <kmo@daterainc.com> | 2013-07-31 00:03:54 -0700 |
---|---|---|
committer | Kent Overstreet <kmo@daterainc.com> | 2013-11-10 21:56:40 -0800 |
commit | 65d22e911bfc4f46cda4751f1b1926b43c316c14 (patch) | |
tree | 2d860067f2cb0d25a3fda0b9d3873d911ce364fe /drivers/md/bcache/bset.c | |
parent | 8aee122071a69ca6fa3314da7713bdf0b61dc07c (diff) | |
download | op-kernel-dev-65d22e911bfc4f46cda4751f1b1926b43c316c14.zip op-kernel-dev-65d22e911bfc4f46cda4751f1b1926b43c316c14.tar.gz |
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 b0fe0dc..1457339 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; |