From: Kent Overstreet Date: Thu, 25 Jul 2013 00:20:00 +0000 (-0700) Subject: bcache: Remove unnecessary check in should_split() X-Git-Tag: next-20130912~34^2~6^2~46 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6594e92f9c70d65516629b9a8e18ecf48b2ff477;p=karo-tx-linux.git 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 --- 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)); }