[Devel] [PATCH rh7] ploop: Decrement active_reqs before bio_endio()

Kirill Tkhai ktkhai at virtuozzo.com
Mon Jun 24 17:31:58 MSK 2019


Otherwise, there are possible false possitive checks
for active_reqs on ploop stop.

https://jira.sw.ru/browse/PSBM-95654

Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 drivers/block/ploop/dev.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/block/ploop/dev.c b/drivers/block/ploop/dev.c
index 9d932d1b959f..10b4abc00592 100644
--- a/drivers/block/ploop/dev.c
+++ b/drivers/block/ploop/dev.c
@@ -636,8 +636,6 @@ DEFINE_BIO_CB(ploop_fast_end_io)
 
 	plo = orig->bi_bdev->bd_disk->private_data;
 
-	BIO_ENDIO(plo->queue, orig, err);
-
 	/* End of fast bio wakes up main process only when this could
 	 * mean exit from ATTENTION state.
 	 */
@@ -653,6 +651,8 @@ DEFINE_BIO_CB(ploop_fast_end_io)
 		wake_up_interruptible(&plo->waitq);
 	spin_unlock_irqrestore(&plo->lock, flags);
 
+	BIO_ENDIO(plo->queue, orig, err);
+
 	bio_put(bio);
 }
 END_BIO_CB(ploop_fast_end_io)



More information about the Devel mailing list