ublk: skip 1 NULL check in ublk_cmd_list_tw_cb() loop
ublk_cmd_list_tw_cb() is always performed on a non-empty request list. So don't check whether rq is NULL on the first iteration of the loop, just on subsequent iterations. Signed-off-by: Caleb Sander Mateos <csander@purestorage.com> Link: https://lore.kernel.org/r/20250328180411.2696494-3-csander@purestorage.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
dfbce8b798
commit
9d7fa99189
@@ -1290,12 +1290,12 @@ static void ublk_cmd_list_tw_cb(struct io_uring_cmd *cmd,
|
||||
struct ublk_queue *ubq = rq->mq_hctx->driver_data;
|
||||
struct request *next;
|
||||
|
||||
while (rq) {
|
||||
do {
|
||||
next = rq->rq_next;
|
||||
rq->rq_next = NULL;
|
||||
ublk_dispatch_req(ubq, rq, issue_flags);
|
||||
rq = next;
|
||||
}
|
||||
} while (rq);
|
||||
}
|
||||
|
||||
static void ublk_queue_cmd_list(struct ublk_queue *ubq, struct rq_list *l)
|
||||
|
||||
Reference in New Issue
Block a user