]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm/mempolicy.c: use enum value MPOL_REBIND_ONCE in mpol_rebind_policy()
authorWang Sheng-Hui <shhuiw@gmail.com>
Thu, 12 Apr 2012 22:51:57 +0000 (08:51 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 17 Apr 2012 03:47:17 +0000 (13:47 +1000)
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>
mm/mempolicy.c

index cfb6c8678754fdb3baf411e2331e87ea64766fb2..4c0b8d5f2ffa00994b336fcb29181c64477e97d6 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;