Skip to content

Commit

Permalink
mempolicy: remove redundant check in __mpol_equal()
Browse files Browse the repository at this point in the history
The 'flags' field is already checked, no need to do it again.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Cc: Bob Liu <lliubbo@gmail.com>
Cc: Lee Schermerhorn <lee.schermerhorn@hp.com>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Namhyung Kim authored and Linus Torvalds committed Mar 23, 2011
1 parent 4031a21 commit 7571966
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mm/mempolicy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1979,8 +1979,7 @@ int __mpol_equal(struct mempolicy *a, struct mempolicy *b)
case MPOL_INTERLEAVE:
return nodes_equal(a->v.nodes, b->v.nodes);
case MPOL_PREFERRED:
return a->v.preferred_node == b->v.preferred_node &&
a->flags == b->flags;
return a->v.preferred_node == b->v.preferred_node;
default:
BUG();
return 0;
Expand Down

0 comments on commit 7571966

Please sign in to comment.