Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198223
b: refs/heads/master
c: 1980050
h: refs/heads/master
i:
  198221: 537c94f
  198219: 6c15025
  198215: 7c5fc2d
  198207: 8996e92
v: v3
  • Loading branch information
Bob Liu authored and Linus Torvalds committed May 25, 2010
1 parent 7b0a37f commit a6ae2c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6eb27e1fdf5781719a3d2e90e6c89fa012135c62
refs/heads/master: 1980050250fa052b1c24a19f9b3d82fae14d77f8
16 changes: 5 additions & 11 deletions trunk/mm/mempolicy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1787,25 +1787,19 @@ 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)
{
if (!a || !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 */
Expand Down

0 comments on commit a6ae2c7

Please sign in to comment.