]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
bcache: Remove unnecessary check in should_split()
authorKent Overstreet <kmo@daterainc.com>
Thu, 25 Jul 2013 00:20:00 +0000 (17:20 -0700)
committerKent Overstreet <kmo@daterainc.com>
Tue, 10 Sep 2013 19:47:28 +0000 (12:47 -0700)
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>
drivers/md/bcache/btree.h

index 3333d3723633c424e0a22d51d7475969392c1130..8a1c7e6bbbe3a7e2f0fe9eacd5e711b1510a9327 100644 (file)
@@ -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));
 }