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>
This commit is contained in:
Kent Overstreet 2013-07-24 17:20:00 -07:00
parent 2d679fc756
commit 8304ad4dc8
1 changed files with 2 additions and 3 deletions

View File

@ -353,7 +353,7 @@ static inline void rw_unlock(bool w, struct btree *b)
_w == insert_lock(op, _b)) \ _w == insert_lock(op, _b)) \
_r = bch_btree_ ## fn(_b, op, ##__VA_ARGS__); \ _r = bch_btree_ ## fn(_b, op, ##__VA_ARGS__); \
rw_unlock(_w, _b); \ rw_unlock(_w, _b); \
bch_cannibalize_unlock(c, &(op)->cl); \ bch_cannibalize_unlock(c, &(op)->cl); \
} while (_r == -EINTR); \ } while (_r == -EINTR); \
\ \
_r; \ _r; \
@ -363,8 +363,7 @@ static inline bool should_split(struct btree *b)
{ {
struct bset *i = write_block(b); struct bset *i = write_block(b);
return b->written >= btree_blocks(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)); > btree_blocks(b));
} }