]> www.infradead.org Git - users/jedix/linux-maple.git/commit
io_uring/ublk: report error when unregister operation fails
authorCaleb Sander Mateos <csander@purestorage.com>
Fri, 28 Feb 2025 23:14:31 +0000 (16:14 -0700)
committerJens Axboe <axboe@kernel.dk>
Sat, 1 Mar 2025 02:15:05 +0000 (19:15 -0700)
commite6ea7ec494881bcf61b8f0f77f7cb3542f717ff2
tree4e47f2956a0d392df239cc96e78655f634f64cad
parent09fdd35162c289f354326a55d552a8858f6e8072
io_uring/ublk: report error when unregister operation fails

Indicate to userspace applications if a UBLK_IO_UNREGISTER_IO_BUF
command specifies an invalid buffer index by returning an error code.
Return -EINVAL if no buffer is registered with the given index, and
-EBUSY if the registered buffer is not a kernel bvec.

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Link: https://lore.kernel.org/r/20250228231432.642417-1-csander@purestorage.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/ublk_drv.c
include/linux/io_uring/cmd.h
io_uring/rsrc.c