Skip to content

Commit

Permalink
xen/blkfront: correct purging of persistent grants
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Juergen Gross <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
jgross1 authored and axboe committed Sep 28, 2018
1 parent 15c2068 commit 6c76786
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/block/xen-blkfront.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6c76786

Please sign in to comment.