diff options
author | Ming Lei <ming.lei@redhat.com> | 2023-10-09 12:33:16 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-10-17 17:27:55 +0300 |
commit | 8ed90e370f9b5442a2766b357b92e36bbf6ba82d (patch) | |
tree | 920878e2ebcce00fc5fe0eb21b9db765b41d3ca9 /drivers/block/ublk_drv.c | |
parent | 6eba24aeb5e2fc582dd83021795befc1adaede20 (diff) | |
download | linux-8ed90e370f9b5442a2766b357b92e36bbf6ba82d.tar.xz |
ublk: don't get ublk device reference in ublk_abort_queue()
ublk_abort_queue() is called in ublk_daemon_monitor_work(), in which
it is guaranteed that the device is live because monitor work is
canceled when removing device, so no need to get the device reference.
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20231009093324.957829-2-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/ublk_drv.c')
-rw-r--r-- | drivers/block/ublk_drv.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c index b0bbda08ad45..59d3652699f5 100644 --- a/drivers/block/ublk_drv.c +++ b/drivers/block/ublk_drv.c @@ -1420,9 +1420,6 @@ static void ublk_abort_queue(struct ublk_device *ub, struct ublk_queue *ubq) { int i; - if (!ublk_get_device(ub)) - return; - for (i = 0; i < ubq->q_depth; i++) { struct ublk_io *io = &ubq->ios[i]; @@ -1438,7 +1435,6 @@ static void ublk_abort_queue(struct ublk_device *ub, struct ublk_queue *ubq) __ublk_fail_req(ubq, io, rq); } } - ublk_put_device(ub); } static void ublk_daemon_monitor_work(struct work_struct *work) |