bcache: fix high CPU occupancy during journal
[sfrench/cifs-2.6.git] / drivers / md / bcache / util.h
index 4df4c5c1cab2ea4ca7f76d9622392ae56de92435..a6763db7f061b64bbfc7552859765725c5b85450 100644 (file)
@@ -112,6 +112,8 @@ do {                                                                        \
 
 #define heap_full(h)   ((h)->used == (h)->size)
 
+#define heap_empty(h)  ((h)->used == 0)
+
 #define DECLARE_FIFO(type, name)                                       \
        struct {                                                        \
                size_t front, back, size, mask;                         \