]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
xen/blkfront: fix bug in backported patch
authorJuergen Gross <jgross@suse.com>
Thu, 23 Dec 2021 10:53:08 +0000 (11:53 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Dec 2021 10:50:30 +0000 (11:50 +0100)
The backport of commit 8f5a695d99000fc ("xen/blkfront: don't take local
copy of a request from the ring page") to stable 4.4 kernel introduced
a bug when adding the needed blkif_ring_get_request() function, as
info->ring.req_prod_pvt was incremented twice now.

Fix that be deleting the now superfluous increments after calling that
function.

Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/block/xen-blkfront.c

index 1e44b7880200d0765b59babef143a11b3b9929c8..ae2c47e99c8889b5fc236b6df8daafa6e7243a5a 100644 (file)
@@ -493,8 +493,6 @@ static int blkif_queue_discard_req(struct request *req)
        else
                ring_req->u.discard.flag = 0;
 
-       info->ring.req_prod_pvt++;
-
        /* Copy the request to the ring page. */
        *final_ring_req = *ring_req;
        info->shadow[id].inflight = true;
@@ -711,8 +709,6 @@ static int blkif_queue_rw_req(struct request *req)
        if (setup.segments)
                kunmap_atomic(setup.segments);
 
-       info->ring.req_prod_pvt++;
-
        /* Copy request(s) to the ring page. */
        *final_ring_req = *ring_req;
        info->shadow[id].inflight = true;