Skip to content

Commit 6c76786

Browse files
jgross1axboe
authored andcommitted
xen/blkfront: correct purging of persistent grants
Commit a46b536 ("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. Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Signed-off-by: Juergen Gross <jgross@suse.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 15c2068 commit 6c76786

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/block/xen-blkfront.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2670,8 +2670,8 @@ static void purge_persistent_grants(struct blkfront_info *info)
26702670
list_del(&gnt_list_entry->node);
26712671
gnttab_end_foreign_access(gnt_list_entry->gref, 0, 0UL);
26722672
rinfo->persistent_gnts_c--;
2673-
__free_page(gnt_list_entry->page);
2674-
kfree(gnt_list_entry);
2673+
gnt_list_entry->gref = GRANT_INVALID_REF;
2674+
list_add_tail(&gnt_list_entry->node, &rinfo->grants);
26752675
}
26762676

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

0 commit comments

Comments
 (0)