Skip to content

Commit 0265595

Browse files
calebsanderaxboe
authored andcommitted
ublk: don't pass ublk_queue to __ublk_fail_req()
__ublk_fail_req() only uses the ublk_queue to get the ublk_device, which its caller already has. So just pass the ublk_device directly. 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 b7e255b commit 0265595

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/block/ublk_drv.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1708,12 +1708,12 @@ static int ublk_ch_mmap(struct file *filp, struct vm_area_struct *vma)
17081708
return remap_pfn_range(vma, vma->vm_start, pfn, sz, vma->vm_page_prot);
17091709
}
17101710

1711-
static void __ublk_fail_req(struct ublk_queue *ubq, struct ublk_io *io,
1711+
static void __ublk_fail_req(struct ublk_device *ub, struct ublk_io *io,
17121712
struct request *req)
17131713
{
17141714
WARN_ON_ONCE(io->flags & UBLK_IO_FLAG_ACTIVE);
17151715

1716-
if (ublk_nosrv_should_reissue_outstanding(ubq->dev))
1716+
if (ublk_nosrv_should_reissue_outstanding(ub))
17171717
blk_mq_requeue_request(req, false);
17181718
else {
17191719
io->res = -EIO;
@@ -1737,7 +1737,7 @@ static void ublk_abort_queue(struct ublk_device *ub, struct ublk_queue *ubq)
17371737
struct ublk_io *io = &ubq->ios[i];
17381738

17391739
if (io->flags & UBLK_IO_FLAG_OWNED_BY_SRV)
1740-
__ublk_fail_req(ubq, io, io->req);
1740+
__ublk_fail_req(ub, io, io->req);
17411741
}
17421742
}
17431743

0 commit comments

Comments
 (0)