Browse Source

bcache: Fix heap_peek() macro

Signed-off-by: Nicholas Swenson <nks@daterainc.com>
Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Nicholas Swenson 11 năm trước cách đây
mục cha
commit
97d11a660f
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      drivers/md/bcache/util.h

+ 1 - 1
drivers/md/bcache/util.h

@@ -110,7 +110,7 @@ do {									\
 	_r;								\
 	_r;								\
 })
 })
 
 
-#define heap_peek(h)	((h)->size ? (h)->data[0] : NULL)
+#define heap_peek(h)	((h)->used ? (h)->data[0] : NULL)
 
 
 #define heap_full(h)	((h)->used == (h)->size)
 #define heap_full(h)	((h)->used == (h)->size)