xen: don't use page->lru for ZONE_DEVICE memory
Commit9e2369c06c
("xen: add helpers to allocate unpopulated memory") introduced usage of ZONE_DEVICE memory for foreign memory mappings. Unfortunately this collides with using page->lru for Xen backend private page caches. Fix that by using page->zone_device_data instead. Cc: <stable@vger.kernel.org> # 5.9 Fixes:9e2369c06c
("xen: add helpers to allocate unpopulated memory") Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Boris Ostrovsky <boris.ostrovksy@oracle.com> Reviewed-by: Jason Andryuk <jandryuk@gmail.com> Signed-off-by: Juergen Gross <jgross@suse.com>
This commit is contained in:
@@ -200,7 +200,11 @@ void gnttab_free_pages(int nr_pages, struct page **pages);
|
||||
|
||||
struct gnttab_page_cache {
|
||||
spinlock_t lock;
|
||||
#ifdef CONFIG_XEN_UNPOPULATED_ALLOC
|
||||
struct page *pages;
|
||||
#else
|
||||
struct list_head pages;
|
||||
#endif
|
||||
unsigned int num_pages;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user