Skip to content

Commit

Permalink
ublk_drv: update comment for __ublk_fail_req()
Browse files Browse the repository at this point in the history
Since __ublk_rq_task_work always fails requests immediately during
exiting, __ublk_fail_req() is only called from abort context during
exiting. So lock is unnecessary.

Signed-off-by: ZiyangZhang <ZiyangZhang@linux.alibaba.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20220815023633.259825-3-ZiyangZhang@linux.alibaba.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
ZiyangZhang authored and Jens Axboe committed Aug 16, 2022
1 parent 966120b commit bb24174
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/block/ublk_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -605,8 +605,9 @@ static void ublk_complete_rq(struct request *req)
}

/*
* __ublk_fail_req() may be called from abort context or ->ubq_daemon
* context during exiting, so lock is required.
* Since __ublk_rq_task_work always fails requests immediately during
* exiting, __ublk_fail_req() is only called from abort context during
* exiting. So lock is unnecessary.
*
* Also aborting may not be started yet, keep in mind that one failed
* request may be issued by block layer again.
Expand Down

0 comments on commit bb24174

Please sign in to comment.