[Devel] [PATCH RHEL7 COMMIT] ploop: don't forget to dec preq->io_count on a error path

Konstantin Khorenko khorenko at virtuozzo.com
Thu Feb 15 14:27:13 MSK 2018


The commit is pushed to "branch-rh7-3.10.0-693.17.1.vz7.43.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-693.17.1.vz7.43.5
------>
commit 2286b24cd2ec192ad864fca6a1681944be495fcd
Author: Andrei Vagin <avagin at openvz.org>
Date:   Thu Feb 15 14:27:13 2018 +0300

    ploop: don't forget to dec preq->io_count on a error path
    
    preq->io_count is incrimented before calling aio_kernel_submit()
    and it is decrimented in kaio_rw_aio_complete().
    
    But if aio_kernel_submit() failed , preq->io_count has to be decrimented
    before exiting from the function.
    
    Signed-off-by: Andrei Vagin <avagin at openvz.org>
---
 drivers/block/ploop/io_kaio.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/block/ploop/io_kaio.c b/drivers/block/ploop/io_kaio.c
index ee9ba2664d72..c7f3bc93bf57 100644
--- a/drivers/block/ploop/io_kaio.c
+++ b/drivers/block/ploop/io_kaio.c
@@ -601,6 +601,7 @@ kaio_io_page(struct ploop_io * io, int op, struct ploop_request * preq,
 		       err, (op == IOCB_CMD_WRITE_ITER) ? "WRITE" : "READ",
 		       preq->eng_state, preq->state, pos);
 		PLOOP_REQ_SET_ERROR(preq, err);
+		ploop_complete_io_request(preq);
 	}
 
 out:


More information about the Devel mailing list