Skip to contentSkip to conversation

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

PATCH Stephen Rothwell 1 participant 2 messages Jul 23, 2021 – Aug 27, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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_write_failed':
fs/f2fs/data.c:3144:27: error: 'mapping' undeclared (first use in this function)
3144 | filemap_invalidate_lock(mapping);
| ^~~~~~~

Caused by commit

ceddc02b7613 ("f2fs: make f2fs_write_failed() take struct inode")

interacting with commit

edc6d01bad73 ("f2fs: Convert to using invalidate_lock")

from the ext3 tree.

I have applied the following merge fix patch.

From: Stephen Rothwell <[email protected]>
Date: Fri, 23 Jul 2021 10:47:23 +1000
Subject: [PATCH] fxup for "f2fs: Convert to using invalidate_lock"

---
 fs/f2fs/data.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/f2fs/data.c +2 -2
index 2e6fee68f891..0fb7b69976f1 100644
@@ -3141,12 +3141,12 @@ static void f2fs_write_failed(struct inode *inode, loff_t to)
 	/* In the fs-verity case, f2fs_end_enable_verity() does the truncate */
 	if (to > i_size && !f2fs_verity_in_progress(inode)) {
 		down_write(&F2FS_I(inode)->i_gc_rwsem[WRITE]);
-		filemap_invalidate_lock(mapping);
+		filemap_invalidate_lock(inode->i_mapping);
 
 		truncate_pagecache(inode, i_size);
 		f2fs_truncate_blocks(inode, i_size, true);
 
-		filemap_invalidate_unlock(mapping);
+		filemap_invalidate_unlock(inode->i_mapping);
 		up_write(&F2FS_I(inode)->i_gc_rwsem[WRITE]);
 	}
 }
Signature · 5 lines
2.30.2

-- 
Cheers,
Stephen Rothwell
#1 lore raw

Hi all,

Quoted 13 lines · On Fri, 23 Jul 2021 11:11:19 +1000 Stephen Rothwell <[email protected]>…

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

fs/f2fs/data.c: In function 'f2fs_write_failed':
fs/f2fs/data.c:3144:27: error: 'mapping' undeclared (first use in this function)
3144 | filemap_invalidate_lock(mapping);
| ^~~~~~~

Caused by commit

ceddc02b7613 ("f2fs: make f2fs_write_failed() take struct inode")

Quoted 8 lines

interacting with commit

edc6d01bad73 ("f2fs: Convert to using invalidate_lock")

from the ext3 tree.

I have applied the following merge fix patch.

This fix up patch is now:

From: Stephen Rothwell <[email protected]>
Date: Fri, 27 Aug 2021 10:10:01 +1000
Subject: [PATCH] fxup for "f2fs: Convert to using invalidate_lock"

---
 fs/f2fs/data.c | 4 ++--
 fs/f2fs/file.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
fs/f2fs/data.c +2 -2
index b03ec36cce1c..0facb5eb0acb 100644
@@ -3260,12 +3260,12 @@ static void f2fs_write_failed(struct inode *inode, loff_t to)
 	/* In the fs-verity case, f2fs_end_enable_verity() does the truncate */
 	if (to > i_size && !f2fs_verity_in_progress(inode)) {
 		down_write(&F2FS_I(inode)->i_gc_rwsem[WRITE]);
-		filemap_invalidate_lock(mapping);
+		filemap_invalidate_lock(inode->i_mapping);
 
 		truncate_pagecache(inode, i_size);
 		f2fs_truncate_blocks(inode, i_size, true);
 
-		filemap_invalidate_unlock(mapping);
+		filemap_invalidate_unlock(inode->i_mapping);
 		up_write(&F2FS_I(inode)->i_gc_rwsem[WRITE]);
 	}
 }
fs/f2fs/file.c +2 -2
index 884a165e70eb..9c8ef33bd8d3 100644
@@ -1112,7 +1112,7 @@ static int punch_hole(struct inode *inode, loff_t offset, loff_t len)
 			blk_end = (loff_t)pg_end << PAGE_SHIFT;
 
 			down_write(&F2FS_I(inode)->i_gc_rwsem[WRITE]);
-			filemap_invalidate_lock(mapping);
+			filemap_invalidate_lock(inode->i_mapping);
 
 			truncate_pagecache_range(inode, blk_start, blk_end - 1);
 
@@ -1120,7 +1120,7 @@ static int punch_hole(struct inode *inode, loff_t offset, loff_t len)
 			ret = f2fs_truncate_hole(inode, pg_start, pg_end);
 			f2fs_unlock_op(sbi);
 
-			filemap_invalidate_unlock(mapping);
+			filemap_invalidate_unlock(inode->i_mapping);
 			up_write(&F2FS_I(inode)->i_gc_rwsem[WRITE]);
 		}
 	}
Signature · 5 lines
2.32.0

-- 
Cheers,
Stephen Rothwell