]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - mm/mempolicy.c
mempolicy: don't call mpol_set_nodemask() when no_context
[net-next-2.6.git] / mm / mempolicy.c
index ac5aeafaec9a6422bb5081775cf014c1c382016b..0e1b293e4054fe548719d2912c5ecdcf24a75339 100644 (file)
@@ -2239,7 +2239,10 @@ int mpol_parse_str(char *str, struct mempolicy **mpol, int no_context)
        if (IS_ERR(new))
                goto out;
 
-       {
+       if (no_context) {
+               /* save for contextualization */
+               new->w.user_nodemask = nodes;
+       } else {
                int ret;
                NODEMASK_SCRATCH(scratch);
                if (scratch) {
@@ -2255,10 +2258,6 @@ int mpol_parse_str(char *str, struct mempolicy **mpol, int no_context)
                }
        }
        err = 0;
-       if (no_context) {
-               /* save for contextualization */
-               new->w.user_nodemask = nodes;
-       }
 
 out:
        /* Restore string for error message */