Commit 3576e60a authored by Caleb Sander Mateos's avatar Caleb Sander Mateos Committed by Jens Axboe
Browse files

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: default avatarCaleb Sander Mateos <csander@purestorage.com>
Reviewed-by: default avatarMing Lei <ming.lei@redhat.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 23c01444
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -2206,10 +2206,9 @@ static int ublk_check_fetch_buf(const struct ublk_device *ub, __u64 buf_addr)
	return 0;
}

static int ublk_fetch(struct io_uring_cmd *cmd, struct ublk_queue *ubq,
static int ublk_fetch(struct io_uring_cmd *cmd, struct ublk_device *ub,
		      struct ublk_io *io, __u64 buf_addr)
{
	struct ublk_device *ub = ubq->dev;
	int ret = 0;

	/*
@@ -2343,7 +2342,7 @@ static int ublk_ch_uring_cmd_local(struct io_uring_cmd *cmd,
		ret = ublk_check_fetch_buf(ub, addr);
		if (ret)
			goto out;
		ret = ublk_fetch(cmd, ubq, io, addr);
		ret = ublk_fetch(cmd, ub, io, addr);
		if (ret)
			goto out;