Re: linux-next: build failure after merge of the akpm tree

From: Stephen Rothwell
Date: Sun Dec 11 2011 - 23:42:02 EST


Hi Andrew,

On Mon, 12 Dec 2011 15:26:01 +1100 Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> wrote:
>
> On Thu, 8 Dec 2011 21:47:44 -0800 Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
> >
> > I suppose this is a good enough fix for that:
> >
> > include/linux/mempolicy.h | 10 ----------
> > mm/mempolicy.c | 12 ++++++++++++
> > 2 files changed, 12 insertions(+), 10 deletions(-)
>
> OK, I applied this to the akpm tree today.

Actually I applied this: (put the inlines the the correct file):

include/linux/mempolicy.h | 10 ----------
kernel/cpuset.c | 12 ++++++++++++
2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h
index d2589e2..7978eec 100644
--- a/include/linux/mempolicy.h
+++ b/include/linux/mempolicy.h
@@ -253,11 +253,6 @@ static inline int vma_migratable(struct vm_area_struct *vma)
return 1;
}

-static inline bool task_has_mempolicy(struct task_struct *task)
-{
- return task->mempolicy;
-}
-
#else

struct mempolicy {};
@@ -384,11 +379,6 @@ static inline int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol,
return 0;
}

-static inline bool task_has_mempolicy(struct task_struct *task)
-{
- return false;
-}
-
#endif /* CONFIG_NUMA */
#endif /* __KERNEL__ */

diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index ba5dfe5..540ef69 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -938,6 +938,18 @@ static void cpuset_migrate_mm(struct mm_struct *mm, const nodemask_t *from,
guarantee_online_mems(task_cs(tsk),&tsk->mems_allowed);
}

+#ifdef CONFIG_NUMA
+static inline bool task_has_mempolicy(struct task_struct *task)
+{
+ return task->mempolicy;
+}
+#else
+static inline bool task_has_mempolicy(struct task_struct *task)
+{
+ return false;
+}
+#endif
+
/*
* cpuset_change_task_nodemask - change task's mems_allowed and mempolicy
* @tsk: the task to change
--
1.7.7.3


--
Cheers,
Stephen Rothwell sfr@xxxxxxxxxxxxxxxx
http://www.canb.auug.org.au/~sfr/

Attachment: pgp00000.pgp
Description: PGP signature