]> Pileus Git - ~andy/linux/blobdiff - mm/mempolicy.c
Pull video into test branch
[~andy/linux] / mm / mempolicy.c
index da9463946556311e9e0945583fd76cdd432298e5..c2aec0e1090d03d540dc43d5b35388b044679c81 100644 (file)
@@ -884,6 +884,10 @@ asmlinkage long sys_mbind(unsigned long start, unsigned long len,
        err = get_nodes(&nodes, nmask, maxnode);
        if (err)
                return err;
+#ifdef CONFIG_CPUSETS
+       /* Restrict the nodes to the allowed nodes in the cpuset */
+       nodes_and(nodes, nodes, current->mems_allowed);
+#endif
        return do_mbind(start, len, mode, &nodes, flags);
 }