Re: linux-next: 20090925 - build breaks with !CONFIG_AIO

From: Martin Schwidefsky
Date: Sat Sep 26 2009 - 07:37:20 EST


On Fri, 25 Sep 2009 18:49:58 +0530
Kamalesh Babulal <kamalesh@xxxxxxxxxxxxxxxxxx> wrote:

> Hi Stephen,
>
> next-20090925 randconfig build breaks on s390x, with CONFIG_AIO=n.
>
> arch/s390/mm/pgtable.c: In function 's390_enable_sie':
> arch/s390/mm/pgtable.c:282: error: 'struct mm_struct' has no member named 'ioctx_list'
> arch/s390/mm/pgtable.c:298: error: 'struct mm_struct' has no member named 'ioctx_list'
> make[1]: *** [arch/s390/mm/pgtable.o] Error 1
>
> Reverting the below commit helps
>
> commit 858f09930b32c11b40fd0c5c467982ba09b10894
> Author: Alexey Dobriyan <adobriyan@xxxxxxxxx>
> Date: Wed Sep 23 15:57:32 2009 -0700
>
> aio: ifdef fields in mm_struct
>
> ->ioctx_lock and ->ioctx_list are used only under CONFIG_AIO.

That should be fixed in the s390 pgtable.c code:

--
Subject: [PATCH] fix build breakage with CONFIG_AIO=n

From: Martin Schwidefsky <schwidefsky@xxxxxxxxxx>

next-20090925 randconfig build breaks on s390x, with CONFIG_AIO=n.

arch/s390/mm/pgtable.c: In function 's390_enable_sie':
arch/s390/mm/pgtable.c:282: error: 'struct mm_struct' has no member named 'ioctx_list'
arch/s390/mm/pgtable.c:298: error: 'struct mm_struct' has no member named 'ioctx_list'
make[1]: *** [arch/s390/mm/pgtable.o] Error 1

Reported-by: Kamalesh Babulal <kamalesh@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Martin Schwidefsky <schwidefsky@xxxxxxxxxx>
---

arch/s390/mm/pgtable.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff -urpN linux-2.6/arch/s390/mm/pgtable.c linux-2.6-patched/arch/s390/mm/pgtable.c
--- linux-2.6/arch/s390/mm/pgtable.c 2009-09-26 13:35:36.000000000 +0200
+++ linux-2.6-patched/arch/s390/mm/pgtable.c 2009-09-26 13:35:47.000000000 +0200
@@ -279,7 +279,10 @@ int s390_enable_sie(void)
/* lets check if we are allowed to replace the mm */
task_lock(tsk);
if (!tsk->mm || atomic_read(&tsk->mm->mm_users) > 1 ||
- tsk->mm != tsk->active_mm || !hlist_empty(&tsk->mm->ioctx_list)) {
+#ifdef CONFIG_AIO
+ !hlist_empty(&tsk->mm->ioctx_list) ||
+#endif
+ tsk->mm != tsk->active_mm) {
task_unlock(tsk);
return -EINVAL;
}
@@ -295,7 +298,10 @@ int s390_enable_sie(void)
/* Now lets check again if something happened */
task_lock(tsk);
if (!tsk->mm || atomic_read(&tsk->mm->mm_users) > 1 ||
- tsk->mm != tsk->active_mm || !hlist_empty(&tsk->mm->ioctx_list)) {
+#ifdef CONFIG_AIO
+ !hlist_empty(&tsk->mm->ioctx_list) ||
+#endif
+ tsk->mm != tsk->active_mm) {
mmput(mm);
task_unlock(tsk);
return -EINVAL;

--
blue skies,
Martin.

"Reality continues to ruin my life." - Calvin.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/