ia64/xen-unstable

changeset 2462:4b6481c1b7f4

bitkeeper revision 1.1159.1.140 (413f68b3CREFxIOSuiOduTrHnibufQ)

Fix ClearForeignPage defintion in Linux 2.4 and 2.6.
author kaf24@freefall.cl.cam.ac.uk
date Wed Sep 08 20:16:51 2004 +0000 (2004-09-08)
parents 77bc1f0ea51f
children 261f532059ea
files linux-2.4.27-xen-sparse/include/linux/mm.h linux-2.6.8.1-xen-sparse/include/linux/page-flags.h
line diff
     1.1 --- a/linux-2.4.27-xen-sparse/include/linux/mm.h	Wed Sep 08 17:36:37 2004 +0000
     1.2 +++ b/linux-2.4.27-xen-sparse/include/linux/mm.h	Wed Sep 08 20:16:51 2004 +0000
     1.3 @@ -336,7 +336,10 @@ typedef struct page {
     1.4  	set_bit(PG_foreign, &(page)->flags);	\
     1.5  	(page)->mapping = (void *)dtor;		\
     1.6  } while (0)
     1.7 -#define ClearPageForeign(page)	clear_bit(PG_foreign, &(page)->flags)
     1.8 +#define ClearPageForeign(page) do {		\
     1.9 +	clear_bit(PG_foreign, &(page)->flags);	\
    1.10 +	(page)->mapping = NULL;			\
    1.11 +} while (0)
    1.12  #define PageForeignDestructor(page)	\
    1.13  	( (void (*) (struct page *)) (page)->mapping )
    1.14  #else
     2.1 --- a/linux-2.6.8.1-xen-sparse/include/linux/page-flags.h	Wed Sep 08 17:36:37 2004 +0000
     2.2 +++ b/linux-2.6.8.1-xen-sparse/include/linux/page-flags.h	Wed Sep 08 20:16:51 2004 +0000
     2.3 @@ -304,7 +304,10 @@ extern unsigned long __read_page_state(u
     2.4  	set_bit(PG_foreign, &(page)->flags);	\
     2.5  	(page)->mapping = (void *)dtor;		\
     2.6  } while (0)
     2.7 -#define ClearPageForeign(page)	clear_bit(PG_foreign, &(page)->flags)
     2.8 +#define ClearPageForeign(page) do {		\
     2.9 +	clear_bit(PG_foreign, &(page)->flags);	\
    2.10 +	(page)->mapping = NULL;			\
    2.11 +} while (0)
    2.12  #define PageForeignDestructor(page)	\
    2.13  	( (void (*) (struct page *)) (page)->mapping )
    2.14  #else