Skip to content

Commit 34c1227

Browse files
Ming Leiaxboe
authored andcommitted
ublk: fix error code for unsupported command
ENOTSUPP is for kernel use only, and shouldn't be sent to userspace. Fix it by replacing it with EOPNOTSUPP. Cc: [email protected] Fixes: bfbcef0 ("ublk_drv: move ublk_get_device_from_id into ublk_ctrl_uring_cmd") Signed-off-by: Ming Lei <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent e924da7 commit 34c1227

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/block/ublk_drv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3041,7 +3041,7 @@ static int ublk_ctrl_uring_cmd(struct io_uring_cmd *cmd,
30413041
ret = ublk_ctrl_end_recovery(ub, cmd);
30423042
break;
30433043
default:
3044-
ret = -ENOTSUPP;
3044+
ret = -EOPNOTSUPP;
30453045
break;
30463046
}
30473047

0 commit comments

Comments
 (0)