lib/zlib: add s390 hardware support for kernel zlib_deflate
[linux-2.6-microblaze.git] / mm / mempolicy.c
index b2920ae..977c641 100644 (file)
@@ -2821,6 +2821,9 @@ int mpol_parse_str(char *str, struct mempolicy **mpol)
        char *flags = strchr(str, '=');
        int err = 1, mode;
 
+       if (flags)
+               *flags++ = '\0';        /* terminate mode string */
+
        if (nodelist) {
                /* NUL-terminate mode or flags string */
                *nodelist++ = '\0';
@@ -2831,9 +2834,6 @@ int mpol_parse_str(char *str, struct mempolicy **mpol)
        } else
                nodes_clear(nodes);
 
-       if (flags)
-               *flags++ = '\0';        /* terminate mode string */
-
        mode = match_string(policy_modes, MPOL_MAX, str);
        if (mode < 0)
                goto out;