浏览代码

bcache: Fix heap_peek() macro

Signed-off-by: Nicholas Swenson <nks@daterainc.com>
Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Nicholas Swenson 11 年之前
父节点
当前提交
97d11a660f
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/md/bcache/util.h

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

@@ -110,7 +110,7 @@ do {									\
 	_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)