aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/xen-blkfront.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2018-09-28 09:40:17 -0600
committerJens Axboe <axboe@kernel.dk>2018-09-28 09:40:17 -0600
commit15c206887603a452f13fbfde2db0f8830d37028c (patch)
treedf1fe73c4682cf40b238cf72d2f966387799edc8 /drivers/block/xen-blkfront.c
parentblk-mq: I/O and timer unplugs are inverted in blktrace (diff)
downloadlinux-dev-15c206887603a452f13fbfde2db0f8830d37028c.tar.xz
linux-dev-15c206887603a452f13fbfde2db0f8830d37028c.zip
Revert "xen/blkfront: When purging persistent grants, keep them in the buffer"
Fix didn't work for all cases, reverting to add a (hopefully) better fix. This reverts commit f151ba989d149bbdfc90e5405724bbea094f9b17. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/xen-blkfront.c')
-rw-r--r--drivers/block/xen-blkfront.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index 3b441fe69c0d..a71d817e900d 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -2667,9 +2667,11 @@ static void purge_persistent_grants(struct blkfront_info *info)
gnttab_query_foreign_access(gnt_list_entry->gref))
continue;
+ list_del(&gnt_list_entry->node);
gnttab_end_foreign_access(gnt_list_entry->gref, 0, 0UL);
- gnt_list_entry->gref = GRANT_INVALID_REF;
rinfo->persistent_gnts_c--;
+ __free_page(gnt_list_entry->page);
+ kfree(gnt_list_entry);
}
spin_unlock_irqrestore(&rinfo->ring_lock, flags);