]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - mm/mempolicy.c
ALSA: hda - fixup input_free_device called after input_unregister_device
[karo-tx-linux.git] / mm / mempolicy.c
index c1b273f1837bb1aefaf0c4a05783d5f38baa9ead..0e0961b8c39ceb18a7eca485753d1a74c905d353 100644 (file)
@@ -162,12 +162,6 @@ static const struct mempolicy_operations {
                        enum mpol_rebind_step step);
 } mpol_ops[MPOL_MAX];
 
-/* Check that the nodemask contains at least one populated zone */
-static int is_valid_nodemask(const nodemask_t *nodemask)
-{
-       return nodes_intersects(*nodemask, node_states[N_MEMORY]);
-}
-
 static inline int mpol_store_user_nodemask(const struct mempolicy *pol)
 {
        return pol->flags & MPOL_MODE_FLAGS;
@@ -202,7 +196,7 @@ static int mpol_new_preferred(struct mempolicy *pol, const nodemask_t *nodes)
 
 static int mpol_new_bind(struct mempolicy *pol, const nodemask_t *nodes)
 {
-       if (!is_valid_nodemask(nodes))
+       if (nodes_empty(*nodes))
                return -EINVAL;
        pol->v.nodes = *nodes;
        return 0;
@@ -234,7 +228,7 @@ static int mpol_set_nodemask(struct mempolicy *pol,
                nodes = NULL;   /* explicit local allocation */
        else {
                if (pol->flags & MPOL_F_RELATIVE_NODES)
-                       mpol_relative_nodemask(&nsc->mask2, nodes,&nsc->mask1);
+                       mpol_relative_nodemask(&nsc->mask2, nodes, &nsc->mask1);
                else
                        nodes_and(nsc->mask2, *nodes, nsc->mask1);