Skip to content

Commit 15c2068

Browse files
committed
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 f151ba9. Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 587562d commit 15c2068

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/block/xen-blkfront.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2667,9 +2667,11 @@ static void purge_persistent_grants(struct blkfront_info *info)
26672667
gnttab_query_foreign_access(gnt_list_entry->gref))
26682668
continue;
26692669

2670+
list_del(&gnt_list_entry->node);
26702671
gnttab_end_foreign_access(gnt_list_entry->gref, 0, 0UL);
2671-
gnt_list_entry->gref = GRANT_INVALID_REF;
26722672
rinfo->persistent_gnts_c--;
2673+
__free_page(gnt_list_entry->page);
2674+
kfree(gnt_list_entry);
26732675
}
26742676

26752677
spin_unlock_irqrestore(&rinfo->ring_lock, flags);

0 commit comments

Comments
 (0)