All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org,
	linux-block@vger.kernel.org
Cc: boris.ostrovsky@oracle.com, roger.pau@citrix.com,
	konrad.wilk@oracle.com, axboe@kernel.dk,
	Juergen Gross <jgross@suse.com>
Subject: [PATCH] xen/blkfront: correct purging of persistent grants
Date: Fri, 28 Sep 2018 09:28:27 +0200	[thread overview]
Message-ID: <20180928072827.14229-1-jgross@suse.com> (raw)

Commit a46b53672b2c2e3770b38a4abf90d16364d2584b ("xen/blkfront: cleanup
stale persistent grants") introduced a regression as purged persistent
grants were not pu into the list of free grants again. Correct that.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
 drivers/block/xen-blkfront.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index a71d817e900d..429d20131c7e 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -2670,8 +2670,8 @@ static void purge_persistent_grants(struct blkfront_info *info)
 			list_del(&gnt_list_entry->node);
 			gnttab_end_foreign_access(gnt_list_entry->gref, 0, 0UL);
 			rinfo->persistent_gnts_c--;
-			__free_page(gnt_list_entry->page);
-			kfree(gnt_list_entry);
+			gnt_list_entry->gref = GRANT_INVALID_REF;
+			list_add_tail(&gnt_list_entry->node, &rinfo->grants);
 		}
 
 		spin_unlock_irqrestore(&rinfo->ring_lock, flags);
-- 
2.16.4

             reply	other threads:[~2018-09-28  7:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-28  7:28 Juergen Gross [this message]
2018-09-28  7:58 ` [PATCH] xen/blkfront: correct purging of persistent grants Alan Robinson
2018-09-28  7:58 ` [Xen-devel] " Alan Robinson
2018-09-28 12:45 ` Boris Ostrovsky
2018-09-28 12:45 ` Boris Ostrovsky
2018-09-28 13:13   ` Juergen Gross
2018-09-28 13:13   ` Juergen Gross
2018-09-28 13:33     ` Boris Ostrovsky
2018-09-28 13:33     ` Boris Ostrovsky
2018-09-28 13:52       ` Juergen Gross
2018-09-28 14:03         ` Boris Ostrovsky
2018-09-28 14:03         ` Boris Ostrovsky
2018-09-28 13:52       ` Juergen Gross
2018-09-28 15:41 ` Jens Axboe
2018-09-28 15:41 ` Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2018-09-28  7:28 Juergen Gross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180928072827.14229-1-jgross@suse.com \
    --to=jgross@suse.com \
    --cc=axboe@kernel.dk \
    --cc=boris.ostrovsky@oracle.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roger.pau@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.