]> git.baikalelectronics.ru Git - kernel.git/commit
block: fix infinite loop for invalid zone append
authorKeith Busch <kbusch@kernel.org>
Fri, 10 Jun 2022 19:58:20 +0000 (12:58 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 27 Jun 2022 12:29:11 +0000 (06:29 -0600)
commitdb93b1050cfe183895bad9d9f17db48dac2a1e26
tree6ca7e56ab78490a6a2b48028f112063985b80604
parent95bff9fd66ecd812d590c69387965cb20664fd49
block: fix infinite loop for invalid zone append

Returning 0 early from __bio_iov_append_get_pages() for the
max_append_sectors warning just creates an infinite loop since 0 means
success, and the bio will never fill from the unadvancing iov_iter. We
could turn the return into an error value, but it will already be turned
into an error value later on, so just remove the warning. Clearly no one
ever hit it anyway.

Fixes: bfecb9aac701f ("block: Introduce REQ_OP_ZONE_APPEND")
Signed-off-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Link: https://lore.kernel.org/r/20220610195830.3574005-2-kbusch@fb.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio.c