summaryrefslogtreecommitdiffstats
path: root/drivers/block/xen-blkback/common.h
diff options
context:
space:
mode:
authorJuergen Gross <jgross@suse.com>2020-12-07 08:31:22 +0100
committerJuergen Gross <jgross@suse.com>2020-12-09 10:31:37 +0100
commitca33479cc7be2c9b5f8be078c8bf3ac26b7d6186 (patch)
tree8877168fff59f8955f29ddaf37a0ac6a0cb3d9fd /drivers/block/xen-blkback/common.h
parenta68a0262abdaa251e12c53715f48e698a18ef402 (diff)
downloadlinux-ca33479cc7be2c9b5f8be078c8bf3ac26b7d6186.tar.bz2
xen: add helpers for caching grant mapping pages
Instead of having similar helpers in multiple backend drivers use common helpers for caching pages allocated via gnttab_alloc_pages(). Make use of those helpers in blkback and scsiback. Cc: <stable@vger.kernel.org> # 5.9 Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Boris Ostrovsky <boris.ostrovksy@oracle.com> Signed-off-by: Juergen Gross <jgross@suse.com>
Diffstat (limited to 'drivers/block/xen-blkback/common.h')
-rw-r--r--drivers/block/xen-blkback/common.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/block/xen-blkback/common.h b/drivers/block/xen-blkback/common.h
index c6ea5d38c509..a1b9df2c4ef1 100644
--- a/drivers/block/xen-blkback/common.h
+++ b/drivers/block/xen-blkback/common.h
@@ -288,9 +288,7 @@ struct xen_blkif_ring {
struct work_struct persistent_purge_work;
/* Buffer of free pages to map grant refs. */
- spinlock_t free_pages_lock;
- int free_pages_num;
- struct list_head free_pages;
+ struct gnttab_page_cache free_pages;
struct work_struct free_work;
/* Thread shutdown wait queue. */