lkml.org 
[lkml]   [2011]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: linux-next: build failure after merge of the akpm tree
On Fri, 9 Dec 2011 16:08:56 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Andrew,
>
> After merging the akpm tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
>
> In file included from kernel/fork.c:21:0:
> include/linux/mempolicy.h: In function 'task_has_mempolicy':
> include/linux/mempolicy.h:258:13: error: dereferencing pointer to incomplete type
>
> And several more like that.
>
> Caused by commit 9d15457f147d
> ("cpusets-stall-when-updating-mems_allowed-for-mempolicy-or-disjoint-nodemask-fix-2").

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(-)
diff -puN include/linux/mempolicy.h~cpusets-stall-when-updating-mems_allowed-for-mempolicy-or-disjoint-nodemask-fix-2-fix-2 include/linux/mempolicy.h
--- a/include/linux/mempolicy.h~cpusets-stall-when-updating-mems_allowed-for-mempolicy-or-disjoint-nodemask-fix-2-fix-2
+++ a/include/linux/mempolicy.h
@@ -253,11 +253,6 @@ static inline int vma_migratable(struct
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 *buff
return 0;
}

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

diff -puN mm/mempolicy.c~cpusets-stall-when-updating-mems_allowed-for-mempolicy-or-disjoint-nodemask-fix-2-fix-2 mm/mempolicy.c
--- a/mm/mempolicy.c~cpusets-stall-when-updating-mems_allowed-for-mempolicy-or-disjoint-nodemask-fix-2-fix-2
+++ a/mm/mempolicy.c
@@ -137,6 +137,18 @@ static const struct mempolicy_operations
enum mpol_rebind_step step);
} mpol_ops[MPOL_MAX];

+#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
+
/* Check that the nodemask contains at least one populated zone */
static int is_valid_nodemask(const nodemask_t *nodemask)
{
_
> I have reverted that patch for today (and the following trivial patch
> "cpusets-stall-when-updating-mems_allowed-for-mempolicy-or-disjoint-nodemask-fix-2-fix").

And I'll drop that one now.


\
 
 \ /
  Last update: 2011-12-09 06:49    [from the cache]
©2003-2011 Jasper Spaans