Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 807b1041 authored by Omar Sandoval's avatar Omar Sandoval Committed by Jens Axboe
Browse files

blk-mq: make driver tag failure path easier to follow



Minor cleanup that makes it easier to figure out what's going on in the
driver tag allocation failure path of blk_mq_dispatch_rq_list().

Signed-off-by: default avatarOmar Sandoval <osandov@fb.com>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent ee056f98
Loading
Loading
Loading
Loading
+9 −10
Original line number Diff line number Diff line
@@ -1003,17 +1003,16 @@ bool blk_mq_dispatch_rq_list(struct request_queue *q, struct list_head *list)
			 * The initial allocation attempt failed, so we need to
			 * rerun the hardware queue when a tag is freed.
			 */
			if (blk_mq_dispatch_wait_add(hctx)) {
			if (!blk_mq_dispatch_wait_add(hctx))
				break;

			/*
				 * It's possible that a tag was freed in the
				 * window between the allocation failure and
				 * adding the hardware queue to the wait queue.
			 * It's possible that a tag was freed in the window
			 * between the allocation failure and adding the
			 * hardware queue to the wait queue.
			 */
			if (!blk_mq_get_driver_tag(rq, &hctx, false))
				break;
			} else {
				break;
			}
		}

		list_del_init(&rq->queuelist);