diff mbox series

ublk: fix error code for unsupported command

Message ID 20241119030646.2319030-1-ming.lei@redhat.com (mailing list archive)
State New
Headers show
Series ublk: fix error code for unsupported command | expand

Commit Message

Ming Lei Nov. 19, 2024, 3:06 a.m. UTC
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>
---
 drivers/block/ublk_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jens Axboe Nov. 19, 2024, 4:20 p.m. UTC | #1
On Tue, 19 Nov 2024 11:06:46 +0800, Ming Lei wrote:
> ENOTSUPP is for kernel use only, and shouldn't be sent to userspace.
> 
> Fix it by replacing it with EOPNOTSUPP.
> 
> 

Applied, thanks!

[1/1] ublk: fix error code for unsupported command
      commit: 34c1227035b3ab930a1ae6ab6f22fec1af8ab09e

Best regards,
diff mbox series

Patch

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;
 	}