summaryrefslogtreecommitdiffstats
path: root/rust
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-05-19 06:40:45 +0200
committerJens Axboe <axboe@kernel.dk>2023-05-20 03:52:29 +0200
commitc1075e548ce6e6b5c7b71f2b05d344164ebc52bb (patch)
tree8b76c40a9cf12bdf1ef53d6a217b3a582a05e341 /rust
parentblk-mq: factor out a blk_rq_init_flush helper (diff)
downloadlinux-c1075e548ce6e6b5c7b71f2b05d344164ebc52bb.tar.xz
linux-c1075e548ce6e6b5c7b71f2b05d344164ebc52bb.zip
blk-mq: reflow blk_insert_flush
Use a switch statement to decide on the disposition of a flush request instead of multiple if statements, out of which one does checks that are more complex than required. Also warn on a malformed request early on instead of doing a BUG_ON later. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20230519044050.107790-3-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'rust')
0 files changed, 0 insertions, 0 deletions