blk-mq: fix potential hang if rolling wakeup depth is too high
[pandora-kernel.git] / block / blk-mq-tag.c
index b087880..146fd02 100644 (file)
@@ -455,8 +455,8 @@ static void bt_update_count(struct blk_mq_bitmap_tags *bt,
        }
 
        bt->wake_cnt = BT_WAIT_BATCH;
-       if (bt->wake_cnt > depth / 4)
-               bt->wake_cnt = max(1U, depth / 4);
+       if (bt->wake_cnt > depth / BT_WAIT_QUEUES)
+               bt->wake_cnt = max(1U, depth / BT_WAIT_QUEUES);
 
        bt->depth = depth;
 }