]> xenbits.xensource.com Git - legacy/linux-2.6.18-xen.git/commitdiff
blktap2: eliminate bogus clearing of PG_reserved
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 10 Aug 2010 14:46:56 +0000 (15:46 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 10 Aug 2010 14:46:56 +0000 (15:46 +0100)
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 <jbeulich@novell.com>
drivers/xen/blktap2/device.c
drivers/xen/blktap2/ring.c

index f15c72308cbfdd9cb9f3fcf16073012ba5378d40..e2b9f4d6cbf92d6a60bd9301ba07e471c4d0d7ac 100644 (file)
@@ -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);
index 5a361205a9e9dc9d6140593ae12a66ddac404429..0ad7832487bf510c075b05094f11c8f2d651792e 100644 (file)
@@ -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;