diff options
author | Ming Lei <ming.lei@redhat.com> | 2024-11-19 11:06:46 +0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-11-19 09:19:46 -0700 |
commit | 34c1227035b3ab930a1ae6ab6f22fec1af8ab09e (patch) | |
tree | d9062d3f6f16604db34488aff3b4cc8a603c4e65 /drivers/block | |
parent | e924da7d6622b72f9eee78a3aad3e75b859da341 (diff) | |
download | linux-stable-34c1227035b3ab930a1ae6ab6f22fec1af8ab09e.tar.gz linux-stable-34c1227035b3ab930a1ae6ab6f22fec1af8ab09e.tar.bz2 linux-stable-34c1227035b3ab930a1ae6ab6f22fec1af8ab09e.zip |
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: 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>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/ublk_drv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c index c6d18cd8af44..d4aed12dd436 100644 --- a/drivers/block/ublk_drv.c +++ b/drivers/block/ublk_drv.c @@ -3041,7 +3041,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; } |