Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ublk: consolidate UBLK_IO_FLAG_{ACTIVE,OWNED_BY_SRV} checks

UBLK_IO_FLAG_ACTIVE and UBLK_IO_FLAG_OWNED_BY_SRV are mutually
exclusive. So just check that UBLK_IO_FLAG_OWNED_BY_SRV is set in
__ublk_ch_uring_cmd(); that implies UBLK_IO_FLAG_ACTIVE is unset.

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20250620151008.3976463-7-csander@purestorage.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Caleb Sander Mateos and committed by
Jens Axboe
2b53d4e9 be4f1b61

+1 -4
+1 -4
drivers/block/ublk_drv.c
··· 2228 2228 goto out; 2229 2229 2230 2230 /* there is pending io cmd, something must be wrong */ 2231 - if (io->flags & UBLK_IO_FLAG_ACTIVE) { 2231 + if (!(io->flags & UBLK_IO_FLAG_OWNED_BY_SRV)) { 2232 2232 ret = -EBUSY; 2233 2233 goto out; 2234 2234 } 2235 - 2236 - if (!(io->flags & UBLK_IO_FLAG_OWNED_BY_SRV)) 2237 - goto out; 2238 2235 2239 2236 /* 2240 2237 * ensure that the user issues UBLK_IO_NEED_GET_DATA