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

Konstantin Khorenko khorenko at virtuozzo.com
Mon Jun 24 18:26:49 MSK 2019


The commit is pushed to "branch-rh7-3.10.0-957.12.2.vz7.96.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.12.2.vz7.96.17
------>
commit 5b4b1de1c2ba79d79ce853a3844a50ca7c84492a
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Mon Jun 24 18:26:47 2019 +0300

    ploop: Decrement active_reqs before bio_endio()
    
    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