Skip to content

Commit 491af20

Browse files
calebsanderaxboe
authored andcommitted
ublk: remove "can't touch 'ublk_io' any more" comments
The struct ublk_io is in fact accessed in __ublk_complete_rq() after the comment. But it's not racy to access the ublk_io between clearing its UBLK_IO_FLAG_OWNED_BY_SRV flag and completing the request, as no other thread can use the ublk_io in the meantime. Signed-off-by: Caleb Sander Mateos <csander@purestorage.com> Reviewed-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 2feca79 commit 491af20

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

drivers/block/ublk_drv.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3349,7 +3349,6 @@ static int ublk_ch_uring_cmd_local(struct io_uring_cmd *cmd,
33493349
io_buffer_unregister_bvec(cmd, buf_idx, issue_flags);
33503350
compl = ublk_need_complete_req(ub, io);
33513351

3352-
/* can't touch 'ublk_io' any more */
33533352
if (req_op(req) == REQ_OP_ZONE_APPEND)
33543353
req->__sector = addr;
33553354
if (compl)
@@ -3681,7 +3680,6 @@ static int ublk_batch_commit_io(struct ublk_queue *ubq,
36813680
return ret;
36823681
}
36833682

3684-
/* can't touch 'ublk_io' any more */
36853683
if (buf_idx != UBLK_INVALID_BUF_IDX)
36863684
io_buffer_unregister_bvec(data->cmd, buf_idx, data->issue_flags);
36873685
if (req_op(req) == REQ_OP_ZONE_APPEND)

0 commit comments

Comments
 (0)