]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
block: reject invalid operation in submit_bio_noacct
authorChristoph Hellwig <hch@lst.de>
Sat, 16 Aug 2025 03:47:57 +0000 (23:47 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:26:10 +0000 (16:26 +0200)
commit3bf71a93d5ec80e9ac9b224c201cf24017ac5b6b
tree39844850cd02872ba1982fae663d16a619404914
parent3c88aa59dda92820a487640462b033526f866acd
block: reject invalid operation in submit_bio_noacct

[ Upstream commit 1c042f8d4bc342b7985b1de3d76836f1a1083b65 ]

submit_bio_noacct allows completely invalid operations, or operations
that are not supported in the bio path.  Extent the existing switch
statement to rejcect all invalid types.

Move the code point for REQ_OP_ZONE_APPEND so that it's not right in the
middle of the zone management operations and the switch statement can
follow the numerical order of the operations.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20231221070538.1112446-1-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Stable-dep-of: 3f66ccbaaef3 ("block: Make REQ_OP_ZONE_FINISH a write operation")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
block/blk-core.c
include/linux/blk_types.h