From a6ae2c77ee79552c4e1cc5c151d3a821e1ae9ab3 Mon Sep 17 00:00:00 2001 From: Bob Liu Date: Mon, 24 May 2010 14:32:01 -0700 Subject: [PATCH] --- yaml --- r: 198223 b: refs/heads/master c: 1980050250fa052b1c24a19f9b3d82fae14d77f8 h: refs/heads/master i: 198221: 537c94feec88f35e664c0c10e88fa5f6cc0622df 198219: 6c150252c8a7949b5873c88888a6738a3a85f55f 198215: 7c5fc2d4ef860cb99a58c8dd705afb7ed5b56eb0 198207: 8996e928b519fc285b4a0af84240dc8f97143e0d v: v3 --- [refs] | 2 +- trunk/mm/mempolicy.c | 16 +++++----------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/[refs] b/[refs] index babff19fc0ae..e9d0ba44bc98 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6eb27e1fdf5781719a3d2e90e6c89fa012135c62 +refs/heads/master: 1980050250fa052b1c24a19f9b3d82fae14d77f8 diff --git a/trunk/mm/mempolicy.c b/trunk/mm/mempolicy.c index d97355b744ab..ac5aeafaec9a 100644 --- a/trunk/mm/mempolicy.c +++ b/trunk/mm/mempolicy.c @@ -1787,16 +1787,6 @@ struct mempolicy *__mpol_cond_copy(struct mempolicy *tompol, return tompol; } -static int mpol_match_intent(const struct mempolicy *a, - const struct mempolicy *b) -{ - if (a->flags != b->flags) - return 0; - if (!mpol_store_user_nodemask(a)) - return 1; - return nodes_equal(a->w.user_nodemask, b->w.user_nodemask); -} - /* Slow path of a mempolicy comparison */ int __mpol_equal(struct mempolicy *a, struct mempolicy *b) { @@ -1804,8 +1794,12 @@ int __mpol_equal(struct mempolicy *a, struct mempolicy *b) return 0; if (a->mode != b->mode) return 0; - if (a->mode != MPOL_DEFAULT && !mpol_match_intent(a, b)) + if (a->flags != b->flags) return 0; + if (mpol_store_user_nodemask(a)) + if (!nodes_equal(a->w.user_nodemask, b->w.user_nodemask)) + return 0; + switch (a->mode) { case MPOL_BIND: /* Fall through */