]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ublk: remove redundant zone op check in ublk_setup_iod()
authorCaleb Sander Mateos <csander@purestorage.com>
Tue, 23 Sep 2025 15:52:48 +0000 (09:52 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 24 Sep 2025 11:48:05 +0000 (05:48 -0600)
ublk_setup_iod() checks first whether the request is a zoned operation
issued to a device without zoned support and returns BLK_STS_IOERR if
so. However, such a request would already hit the default case in the
subsequent switch statement and fail the ublk_queue_is_zoned() check,
which also results in a return of BLK_STS_IOERR. So remove the redundant
early check for unsupported zone ops.

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/ublk_drv.c

index 5ab7ff5f03f4c1f398293c54b8d639c2207c8d00..fcc8b3868137eacde4fd87846ad268d4e7623356 100644 (file)
@@ -1105,13 +1105,8 @@ static blk_status_t ublk_setup_iod(struct ublk_queue *ubq, struct request *req)
 {
        struct ublksrv_io_desc *iod = ublk_get_iod(ubq, req->tag);
        struct ublk_io *io = &ubq->ios[req->tag];
-       enum req_op op = req_op(req);
        u32 ublk_op;
 
-       if (!ublk_queue_is_zoned(ubq) &&
-           (op_is_zone_mgmt(op) || op == REQ_OP_ZONE_APPEND))
-               return BLK_STS_IOERR;
-
        switch (req_op(req)) {
        case REQ_OP_READ:
                ublk_op = UBLK_IO_OP_READ;