]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ublk: don't pass ublk_queue to ublk_fetch()
authorCaleb Sander Mateos <csander@purestorage.com>
Thu, 18 Sep 2025 01:49:49 +0000 (19:49 -0600)
committerJens Axboe <axboe@kernel.dk>
Sat, 20 Sep 2025 12:36:27 +0000 (06:36 -0600)
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 <csander@purestorage.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/ublk_drv.c

index 9535382f9f8e7883ef3feb542afc660fad3913c6..9a726d048703fcc47ac138fd7d1f40ccc336320a 100644 (file)
@@ -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;