Skip to content

Commit 3576e60

Browse files
calebsanderaxboe
authored andcommitted
ublk: don't pass ublk_queue to ublk_fetch()
ublk_fetch() 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 <[email protected]> Reviewed-by: Ming Lei <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 23c0144 commit 3576e60

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/block/ublk_drv.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2206,10 +2206,9 @@ static int ublk_check_fetch_buf(const struct ublk_device *ub, __u64 buf_addr)
22062206
return 0;
22072207
}
22082208

2209-
static int ublk_fetch(struct io_uring_cmd *cmd, struct ublk_queue *ubq,
2209+
static int ublk_fetch(struct io_uring_cmd *cmd, struct ublk_device *ub,
22102210
struct ublk_io *io, __u64 buf_addr)
22112211
{
2212-
struct ublk_device *ub = ubq->dev;
22132212
int ret = 0;
22142213

22152214
/*
@@ -2343,7 +2342,7 @@ static int ublk_ch_uring_cmd_local(struct io_uring_cmd *cmd,
23432342
ret = ublk_check_fetch_buf(ub, addr);
23442343
if (ret)
23452344
goto out;
2346-
ret = ublk_fetch(cmd, ubq, io, addr);
2345+
ret = ublk_fetch(cmd, ub, io, addr);
23472346
if (ret)
23482347
goto out;
23492348

0 commit comments

Comments
 (0)