Re: 'struct task_struct' has no member named 'mems_allowed' (was: Re: 2.6.20-rc4-mm1)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 12 Jan 2007, Paul Jackson wrote:

> I'll leave the honors to Christoph (added to CC), since this is his patch.

Ok. Here it is

mems_allowed only exists if CONFIG_CPUSETS is set. So put an #ifdef around
it. Also move the masking of the nodes behind the error check (looks 
better) and add a comment.

Signed-off-by: Christoph Lameter <[email protected]>

Index: linux-2.6.20-rc4-mm1/mm/mempolicy.c
===================================================================
--- linux-2.6.20-rc4-mm1.orig/mm/mempolicy.c	2007-01-12 13:20:17.000000000 -0600
+++ linux-2.6.20-rc4-mm1/mm/mempolicy.c	2007-01-12 13:21:30.220968608 -0600
@@ -882,9 +882,12 @@ asmlinkage long sys_mbind(unsigned long 
 	int err;
 
 	err = get_nodes(&nodes, nmask, maxnode);
-	nodes_and(nodes, nodes, current->mems_allowed);
 	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);
 }
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux