diff --git a/[refs] b/[refs] index a471f7f92b23..edb9546835df 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 45c4745af381851b0406d8e4db99e62e265691c2 +refs/heads/master: aab0b1029f0843756b68e0ed3ca983685bf43ed6 diff --git a/trunk/include/linux/mempolicy.h b/trunk/include/linux/mempolicy.h index 9080fab1426d..017def89e568 100644 --- a/trunk/include/linux/mempolicy.h +++ b/trunk/include/linux/mempolicy.h @@ -44,6 +44,13 @@ enum { #define MPOL_MF_MOVE_ALL (1<<2) /* Move every page to conform to mapping */ #define MPOL_MF_INTERNAL (1<<3) /* Internal flags start here */ +/* + * Internal flags that share the struct mempolicy flags word with + * "mode flags". These flags are allocated from bit 0 up, as they + * are never OR'ed into the mode in mempolicy API arguments. + */ +#define MPOL_F_SHARED (1 << 0) /* identify shared policies */ + #ifdef __KERNEL__ #include diff --git a/trunk/mm/mempolicy.c b/trunk/mm/mempolicy.c index 5e7eea2dc8b4..78b18a60b9b2 100644 --- a/trunk/mm/mempolicy.c +++ b/trunk/mm/mempolicy.c @@ -1750,6 +1750,7 @@ static struct sp_node *sp_alloc(unsigned long start, unsigned long end, n->start = start; n->end = end; mpol_get(pol); + pol->flags |= MPOL_F_SHARED; /* for unref */ n->policy = pol; return n; }