summaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorMing Lei <ming.lei@redhat.com>2024-11-19 11:06:46 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-12-05 14:03:01 +0100
commit31e45c09a8ea0cdca7a894413ad3bfc3d4cbe330 (patch)
tree9bd3ffe58470c6a44155a03dad9791a1121d1262 /drivers/block
parent8380967174103664c3bf96b62d6215c9dcf8b047 (diff)
downloadlinux-31e45c09a8ea0cdca7a894413ad3bfc3d4cbe330.tar.gz
linux-31e45c09a8ea0cdca7a894413ad3bfc3d4cbe330.tar.bz2
linux-31e45c09a8ea0cdca7a894413ad3bfc3d4cbe330.zip
ublk: fix error code for unsupported command
commit 34c1227035b3ab930a1ae6ab6f22fec1af8ab09e upstream. ENOTSUPP is for kernel use only, and shouldn't be sent to userspace. Fix it by replacing it with EOPNOTSUPP. Cc: stable@vger.kernel.org Fixes: bfbcef036396 ("ublk_drv: move ublk_get_device_from_id into ublk_ctrl_uring_cmd") Signed-off-by: Ming Lei <ming.lei@redhat.com> Link: https://lore.kernel.org/r/20241119030646.2319030-1-ming.lei@redhat.com Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/ublk_drv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c
index a5431ce3007b..90bc605ff6c2 100644
--- a/drivers/block/ublk_drv.c
+++ b/drivers/block/ublk_drv.c
@@ -2974,7 +2974,7 @@ static int ublk_ctrl_uring_cmd(struct io_uring_cmd *cmd,
ret = ublk_ctrl_end_recovery(ub, cmd);
break;
default:
- ret = -ENOTSUPP;
+ ret = -EOPNOTSUPP;
break;
}