From d189079551e4d02ea31109290e3adaf72c05c85c Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Tue, 10 Aug 2010 15:46:56 +0100 Subject: [PATCH] blktap2: eliminate bogus clearing of PG_reserved While making sure PG_reserved is set for pages allocated from the balloon driver (and to be used for I/O) is a necessary thing to do (as 2.6.18's as well as pv-ops' balloon drivers don't guarantee this for the pages returned from alloc_empty_pages_and_page_vec()), clearing this flag again when a page is no longer in use for I/O is bogus at best (after all, the page at that point is not associated with any MFN anymore), and causes problems when the balloon driver properly marks all such pages as reserved and checks, upon their return, that they are still marked this way. Signed-off-by: Jan Beulich --- drivers/xen/blktap2/device.c | 1 - drivers/xen/blktap2/ring.c | 9 +++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/xen/blktap2/device.c b/drivers/xen/blktap2/device.c index f15c7230..e2b9f4d6 100644 --- a/drivers/xen/blktap2/device.c +++ b/drivers/xen/blktap2/device.c @@ -281,7 +281,6 @@ blktap_device_fast_flush(struct blktap *tap, struct blktap_request *request) page = map[offset]; if (page) { - ClearPageReserved(map[offset]); if (PageBlkback(page)) { ClearPageBlkback(page); set_page_private(page, 0); diff --git a/drivers/xen/blktap2/ring.c b/drivers/xen/blktap2/ring.c index 5a361205..0ad78324 100644 --- a/drivers/xen/blktap2/ring.c +++ b/drivers/xen/blktap2/ring.c @@ -112,12 +112,9 @@ blktap_ring_clear_pte(struct vm_area_struct *vma, offset = (int)((uvaddr - vma->vm_start) >> PAGE_SHIFT); page = map[offset]; - if (page) { - ClearPageReserved(page); - if (PageBlkback(page)) { - ClearPageBlkback(page); - set_page_private(page, 0); - } + if (page && PageBlkback(page)) { + ClearPageBlkback(page); + set_page_private(page, 0); } map[offset] = NULL; -- 2.39.5