summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kmo@daterainc.com>2013-07-25 04:20:00 +0400
committerKent Overstreet <kmo@daterainc.com>2013-11-11 09:55:56 +0400
commit8304ad4dc818ffd701c2f3e90683b5b8013f44e2 (patch)
treea4bcbe827f9b4fe824191f0e95471f6f47f4b9ec
parent2d679fc75678551485df62274edaed452becd16d (diff)
downloadlinux-8304ad4dc818ffd701c2f3e90683b5b8013f44e2.tar.xz
bcache: Remove unnecessary check in should_split()
Checking i->seq was redundant, because since ages ago we always initialize the new bset when advancing b->written Signed-off-by: Kent Overstreet <kmo@daterainc.com>
-rw-r--r--drivers/md/bcache/btree.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/md/bcache/btree.h b/drivers/md/bcache/btree.h
index 3333d3723633..8a1c7e6bbbe3 100644
--- a/drivers/md/bcache/btree.h
+++ b/drivers/md/bcache/btree.h
@@ -353,7 +353,7 @@ static inline void rw_unlock(bool w, struct btree *b)
_w == insert_lock(op, _b)) \
_r = bch_btree_ ## fn(_b, op, ##__VA_ARGS__); \
rw_unlock(_w, _b); \
- bch_cannibalize_unlock(c, &(op)->cl); \
+ bch_cannibalize_unlock(c, &(op)->cl); \
} while (_r == -EINTR); \
\
_r; \
@@ -363,8 +363,7 @@ static inline bool should_split(struct btree *b)
{
struct bset *i = write_block(b);
return b->written >= btree_blocks(b) ||
- (i->seq == b->sets[0].data->seq &&
- b->written + __set_blocks(i, i->keys + 15, b->c)
+ (b->written + __set_blocks(i, i->keys + 15, b->c)
> btree_blocks(b));
}