Skip to contentSkip to conversation

ublk: fix error code for unsupported command

PATCH Applied Ming Lei 2 participants 2 messages Nov 19, 2024

Subsystems (3)
lore
Share & tools
lore

Ming Lei

author
#0 lore raw

PATCH 1/1 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.

Fixes bfbcef036396 ("ublk_drv: move ublk_get_device_from_id into ublk_ctrl_uring_cmd")
---
 drivers/block/ublk_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/block/ublk_drv.c +1 -1
index c6d18cd8af44..d4aed12dd436 100644
@@ -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;
 	}
 
Signature · 1 line
2.44.0
maintainer Applied
#1 lore raw
Quoted 5 lines · Ming Lei

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,

Signature · 1 line
Jens Axboe