linux-next: build failure after merge of the f2fs tree

Subsystems: f2fs file system, filesystems (vfs and infrastructure), the rest

2 messages, 1 author, 2021-07-11 · open the first message on its own page

linux-next: build failure after merge of the f2fs tree

From: Stephen Rothwell <hidden>
Date: 2021-06-23 00:49:32

Hi all,

After merging the f2fs tree, today's linux-next build (x86_64
allmodconfig) failed like this:

fs/f2fs/data.c: In function 'f2fs_migrate_blocks':
fs/f2fs/data.c:3853:27: error: 'struct f2fs_inode_info' has no member named 'i_mmap_sem'
 3853 |  down_write(&F2FS_I(inode)->i_mmap_sem);
      |                           ^~
fs/f2fs/data.c:3895:25: error: 'struct f2fs_inode_info' has no member named 'i_mmap_sem'
 3895 |  up_write(&F2FS_I(inode)->i_mmap_sem);
      |                         ^~

Caused by commit

  7cc52cc33717 ("f2fs: swap: support migrating swapfile in aligned write mode")

interacting with commit

  c3762b9d26e1 ("f2fs: Convert to using invalidate_lock")

from the ext3 tree.

I have applied the following merge fix patch:

From: Stephen Rothwell <redacted>
Date: Wed, 23 Jun 2021 10:40:54 +1000
Subject: [PATCH] fix up for "f2fs: Convert to using invalidate_lock"

Signed-off-by: Stephen Rothwell <redacted>
---
 fs/f2fs/data.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 2fc1b71c640b..acf2dea65abc 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -3850,7 +3850,7 @@ static int f2fs_migrate_blocks(struct inode *inode, block_t start_blk,
 	int ret = 0;
 
 	down_write(&F2FS_I(inode)->i_gc_rwsem[WRITE]);
-	down_write(&F2FS_I(inode)->i_mmap_sem);
+	filemap_invalidate_lock(inode->i_mapping);
 
 	set_inode_flag(inode, FI_ALIGNED_WRITE);
 
@@ -3892,7 +3892,7 @@ static int f2fs_migrate_blocks(struct inode *inode, block_t start_blk,
 	clear_inode_flag(inode, FI_DO_DEFRAG);
 	clear_inode_flag(inode, FI_ALIGNED_WRITE);
 
-	up_write(&F2FS_I(inode)->i_mmap_sem);
+	filemap_invalidate_unlock(inode->i_mapping);
 	up_write(&F2FS_I(inode)->i_gc_rwsem[WRITE]);
 
 	return ret;
-- 
2.30.2

-- 
Cheers,
Stephen Rothwell

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

From: Stephen Rothwell <hidden>
Date: 2021-07-11 03:08:29

Hi all,

On Wed, 23 Jun 2021 10:49:22 +1000 Stephen Rothwell [off-list ref] wrote:
quoted hunk
Hi all,

After merging the f2fs tree, today's linux-next build (x86_64
allmodconfig) failed like this:

fs/f2fs/data.c: In function 'f2fs_migrate_blocks':
fs/f2fs/data.c:3853:27: error: 'struct f2fs_inode_info' has no member named 'i_mmap_sem'
 3853 |  down_write(&F2FS_I(inode)->i_mmap_sem);
      |                           ^~
fs/f2fs/data.c:3895:25: error: 'struct f2fs_inode_info' has no member named 'i_mmap_sem'
 3895 |  up_write(&F2FS_I(inode)->i_mmap_sem);
      |                         ^~

Caused by commit

  7cc52cc33717 ("f2fs: swap: support migrating swapfile in aligned write mode")

interacting with commit

  c3762b9d26e1 ("f2fs: Convert to using invalidate_lock")

from the ext3 tree.

I have applied the following merge fix patch:

From: Stephen Rothwell <redacted>
Date: Wed, 23 Jun 2021 10:40:54 +1000
Subject: [PATCH] fix up for "f2fs: Convert to using invalidate_lock"

Signed-off-by: Stephen Rothwell <redacted>
---
 fs/f2fs/data.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 2fc1b71c640b..acf2dea65abc 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -3850,7 +3850,7 @@ static int f2fs_migrate_blocks(struct inode *inode, block_t start_blk,
 	int ret = 0;
 
 	down_write(&F2FS_I(inode)->i_gc_rwsem[WRITE]);
-	down_write(&F2FS_I(inode)->i_mmap_sem);
+	filemap_invalidate_lock(inode->i_mapping);
 
 	set_inode_flag(inode, FI_ALIGNED_WRITE);
 
@@ -3892,7 +3892,7 @@ static int f2fs_migrate_blocks(struct inode *inode, block_t start_blk,
 	clear_inode_flag(inode, FI_DO_DEFRAG);
 	clear_inode_flag(inode, FI_ALIGNED_WRITE);
 
-	up_write(&F2FS_I(inode)->i_mmap_sem);
+	filemap_invalidate_unlock(inode->i_mapping);
 	up_write(&F2FS_I(inode)->i_gc_rwsem[WRITE]);
 
 	return ret;
This is now a conflict between the ext3 tree and Linus' tree.

-- 
Cheers,
Stephen Rothwell
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help