From: Caleb Sander Mateos Date: Thu, 18 Sep 2025 01:49:49 +0000 (-0600) Subject: ublk: don't pass ublk_queue to ublk_fetch() X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3576e60a33c7f6be024b80f8c87312032fd27892;p=thirdparty%2Fkernel%2Fstable.git 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 Reviewed-by: Ming Lei Signed-off-by: Jens Axboe --- diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c index 9535382f9f8e7..9a726d048703f 100644 --- a/drivers/block/ublk_drv.c +++ b/drivers/block/ublk_drv.c @@ -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;