Skip to content

Commit f85e254

Browse files
calebsanderaxboe
authored andcommitted
ublk: remove redundant zone op check in ublk_setup_iod()
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>
1 parent 7378b00 commit f85e254

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

drivers/block/ublk_drv.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,13 +1105,8 @@ static blk_status_t ublk_setup_iod(struct ublk_queue *ubq, struct request *req)
11051105
{
11061106
struct ublksrv_io_desc *iod = ublk_get_iod(ubq, req->tag);
11071107
struct ublk_io *io = &ubq->ios[req->tag];
1108-
enum req_op op = req_op(req);
11091108
u32 ublk_op;
11101109

1111-
if (!ublk_queue_is_zoned(ubq) &&
1112-
(op_is_zone_mgmt(op) || op == REQ_OP_ZONE_APPEND))
1113-
return BLK_STS_IOERR;
1114-
11151110
switch (req_op(req)) {
11161111
case REQ_OP_READ:
11171112
ublk_op = UBLK_IO_OP_READ;

0 commit comments

Comments
 (0)