diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 2d3077ce50cd..ecbda7f5d494 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -2128,6 +2128,9 @@ bool __mpol_equal(struct mempolicy *a, struct mempolicy *b) case MPOL_INTERLEAVE: return !!nodes_equal(a->v.nodes, b->v.nodes); case MPOL_PREFERRED: + /* a's ->flags is the same as b's */ + if (a->flags & MPOL_F_LOCAL) + return true; return a->v.preferred_node == b->v.preferred_node; default: BUG();