2014-11-06 05:44:53

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the akpm-current tree

Hi Andrew,

After merging the akpm-current tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

mm/fremap.c: In function 'SYSC_remap_file_pages':
mm/fremap.c:241:22: error: 'struct address_space' has no member named 'i_mmap_mutex'
mutex_lock(&mapping->i_mmap_mutex);
^
mm/fremap.c:247:24: error: 'struct address_space' has no member named 'i_mmap_mutex'
mutex_unlock(&mapping->i_mmap_mutex);
^

Caused by commit 1f8c97e79f66 ("mm: convert i_mmap_mutex to rwsem").

I applied this patch for today (not sure if there is a better way):

From: Stephen Rothwell <[email protected]>
Date: Thu, 6 Nov 2014 16:26:41 +1100
Subject: [PATCH] mm: convert i_mmap_mutex to rwsem fix

Signed-off-by: Stephen Rothwell <[email protected]>
---
mm/fremap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/fremap.c b/mm/fremap.c
index 9129013732d7..2805d71cf476 100644
--- a/mm/fremap.c
+++ b/mm/fremap.c
@@ -238,13 +238,13 @@ get_write_lock:
}
goto out_freed;
}
- mutex_lock(&mapping->i_mmap_mutex);
+ i_mmap_lock_write(mapping);
flush_dcache_mmap_lock(mapping);
vma->vm_flags |= VM_NONLINEAR;
vma_interval_tree_remove(vma, &mapping->i_mmap);
vma_nonlinear_insert(vma, &mapping->i_mmap_nonlinear);
flush_dcache_mmap_unlock(mapping);
- mutex_unlock(&mapping->i_mmap_mutex);
+ i_mmap_unlock_write(mapping);
}

if (vma->vm_flags & VM_LOCKED) {
--
2.1.1

--
Cheers,
Stephen Rothwell [email protected]


Attachments:
(No filename) (819.00 B)
OpenPGP digital signature

2014-11-06 09:10:17

by Davidlohr Bueso

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the akpm-current tree

On Thu, 2014-11-06 at 16:44 +1100, Stephen Rothwell wrote:
> Hi Andrew,
>
> After merging the akpm-current tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
>
> mm/fremap.c: In function 'SYSC_remap_file_pages':
> mm/fremap.c:241:22: error: 'struct address_space' has no member named 'i_mmap_mutex'
> mutex_lock(&mapping->i_mmap_mutex);
> ^
> mm/fremap.c:247:24: error: 'struct address_space' has no member named 'i_mmap_mutex'
> mutex_unlock(&mapping->i_mmap_mutex);
> ^
>
> Caused by commit 1f8c97e79f66 ("mm: convert i_mmap_mutex to rwsem").
>
> I applied this patch for today (not sure if there is a better way):
>
> From: Stephen Rothwell <[email protected]>
> Date: Thu, 6 Nov 2014 16:26:41 +1100
> Subject: [PATCH] mm: convert i_mmap_mutex to rwsem fix
>
> Signed-off-by: Stephen Rothwell <[email protected]>
> ---
> mm/fremap.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/fremap.c b/mm/fremap.c
> index 9129013732d7..2805d71cf476 100644
> --- a/mm/fremap.c
> +++ b/mm/fremap.c
> @@ -238,13 +238,13 @@ get_write_lock:
> }
> goto out_freed;
> }
> - mutex_lock(&mapping->i_mmap_mutex);
> + i_mmap_lock_write(mapping);

That's the correct fix, thanks. However, I had particularly dropped that
modification because linux-next no longer even has mm/fremap.c so I'm
not sure what went wrong here...

2014-11-06 10:18:53

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the akpm-current tree

Hi,

On Thu, 06 Nov 2014 01:09:41 -0800 Davidlohr Bueso <[email protected]> wrote:
>
> On Thu, 2014-11-06 at 16:44 +1100, Stephen Rothwell wrote:
> >
> > After merging the akpm-current tree, today's linux-next build (powerpc
> > ppc64_defconfig) failed like this:
> >
> > mm/fremap.c: In function 'SYSC_remap_file_pages':
> > mm/fremap.c:241:22: error: 'struct address_space' has no member named 'i_mmap_mutex'
> > mutex_lock(&mapping->i_mmap_mutex);
> > ^
> > mm/fremap.c:247:24: error: 'struct address_space' has no member named 'i_mmap_mutex'
> > mutex_unlock(&mapping->i_mmap_mutex);
> > ^
> >
> > Caused by commit 1f8c97e79f66 ("mm: convert i_mmap_mutex to rwsem").
> >
> > I applied this patch for today (not sure if there is a better way):
> >
> > From: Stephen Rothwell <[email protected]>
> > Date: Thu, 6 Nov 2014 16:26:41 +1100
> > Subject: [PATCH] mm: convert i_mmap_mutex to rwsem fix
> >
> > Signed-off-by: Stephen Rothwell <[email protected]>
> > ---
> > mm/fremap.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/mm/fremap.c b/mm/fremap.c
> > index 9129013732d7..2805d71cf476 100644
> > --- a/mm/fremap.c
> > +++ b/mm/fremap.c
> > @@ -238,13 +238,13 @@ get_write_lock:
> > }
> > goto out_freed;
> > }
> > - mutex_lock(&mapping->i_mmap_mutex);
> > + i_mmap_lock_write(mapping);
>
> That's the correct fix, thanks. However, I had particularly dropped that
> modification because linux-next no longer even has mm/fremap.c so I'm
> not sure what went wrong here...

Andrew's tree gets added in two sections and he put your patch in the
first part but the patch that removes this file is in the second part,
so all that really needs to happen is for the patches to be reordered.

--
Cheers,
Stephen Rothwell [email protected]


Attachments:
(No filename) (819.00 B)
OpenPGP digital signature