[PATCH 1/2] bcache: remove redundant KEY_PTRS(k) check in bch_btree_ptr_bad

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM Kernel]     [Linux Filesystem Development]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux