]> rtime.felk.cvut.cz Git - can-eth-gw-linux.git/commitdiff
mm/mempolicy.c: use enum value MPOL_REBIND_ONCE in mpol_rebind_policy()
authorWang Sheng-Hui <shhuiw@gmail.com>
Tue, 29 May 2012 22:06:16 +0000 (15:06 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 29 May 2012 23:22:18 +0000 (16:22 -0700)
We have enum definition in mempolicy.h: MPOL_REBIND_ONCE.  It should
replace the magic number 0 for step comparison in function
mpol_rebind_policy.

Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/mempolicy.c

index 88f9422b92e73afc2be25161f20a7957d4a54160..a388888b6fcf77f88481dfb6fe1480e83f9c50d7 100644 (file)
@@ -390,7 +390,7 @@ static void mpol_rebind_policy(struct mempolicy *pol, const nodemask_t *newmask,
 {
        if (!pol)
                return;
-       if (!mpol_store_user_nodemask(pol) && step == 0 &&
+       if (!mpol_store_user_nodemask(pol) && step == MPOL_REBIND_ONCE &&
            nodes_equal(pol->w.cpuset_mems_allowed, *newmask))
                return;