]> git.baikalelectronics.ru Git - kernel.git/commit
dm: do not return early from dm_io_complete if BLK_STS_AGAIN without polling
authorMike Snitzer <snitzer@kernel.org>
Tue, 21 Jun 2022 17:37:06 +0000 (13:37 -0400)
committerMike Snitzer <snitzer@kernel.org>
Tue, 21 Jun 2022 17:48:52 +0000 (13:48 -0400)
commita88418a62185e1dcf194366daa19861348f933b6
treed61a1bcc7c4b2491559b983349c767403d2d8f22
parent69ec4f0a3aa7a22b4f809e617392687284e8ec91
dm: do not return early from dm_io_complete if BLK_STS_AGAIN without polling

Commit cbe38f9c74652 ("dm: fix bio polling to handle possibile
BLK_STS_AGAIN") inadvertently introduced an early return from
dm_io_complete() without first queueing the bio to DM if BLK_STS_AGAIN
occurs and bio-polling is _not_ being used.

Fix this by only returning early from dm_io_complete() if the bio has
first been properly queued to DM. Otherwise, the bio will never finish
via bio_endio.

Fixes: cbe38f9c74652 ("dm: fix bio polling to handle possibile BLK_STS_AGAIN")
Cc: stable@vger.kernel.org
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
drivers/md/dm.c