bch_btree_ptr_bad() -> bch_ptr_invalid() -> bch_btree_ptr_invalid() -> __bch_btree_ptr_invalid() will check !KEY_PTRS(k). No need check !KEY_PTRS(k) explicitly in bch_btree_ptr_bad(). Signed-off-by: Shenghui Wang <shhuiw@xxxxxxxxxxx> --- drivers/md/bcache/extents.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/md/bcache/extents.c b/drivers/md/bcache/extents.c index 886710043025..5a05407a8126 100644 --- a/drivers/md/bcache/extents.c +++ b/drivers/md/bcache/extents.c @@ -208,7 +208,6 @@ static bool bch_btree_ptr_bad(struct btree_keys *bk, const struct bkey *k) unsigned int i; if (!bkey_cmp(k, &ZERO_KEY) || - !KEY_PTRS(k) || bch_ptr_invalid(bk, k)) return true; -- 2.20.1