Subject: linux-next: build failure after merge of the fsverity tree

From: Mark Brown <[email-masked]>
Date: Tue, 3 Feb 2026 13:36:34 +0000

Hi all,

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

/tmp/next/build/fs/f2fs/data.c: In function 'f2fs_read_data_large_folio':
/tmp/next/build/fs/f2fs/data.c:2525:51: error: passing argument 1 of 'fsverity_verify_page' from incompatible pointer type [-Wincompatible-pointer-types]
 2525 |                             !fsverity_verify_page(folio_file_page(folio,
      |                                                   ^~~~~~~~~~~~~~~~~~~~~~
      |                                                   |
      |                                                   struct page *
 2526 |                                                                 index))) {
      |                                                                 ~~~~~~
In file included from /tmp/next/build/fs/f2fs/f2fs.h:29,
                 from /tmp/next/build/fs/f2fs/data.c:24:
/tmp/next/build/include/linux/fsverity.h:285:63: note: expected 'struct fsverity_info *' but argument is of type 'struct page *'
  285 | static inline bool fsverity_verify_page(struct fsverity_info *vi,
      |                                         ~~~~~~~~~~~~~~~~~~~~~~^~
/tmp/next/build/fs/f2fs/data.c:2525:30: error: too few arguments to function 'fsverity_verify_page'
 2525 |                             !fsverity_verify_page(folio_file_page(folio,
      |                              ^~~~~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/fsverity.h:285:20: note: declared here
  285 | static inline bool fsverity_verify_page(struct fsverity_info *vi,
      |                    ^~~~~~~~~~~~~~~~~~~~
/tmp/next/build/fs/f2fs/data.c:2557:57: error: passing argument 2 of 'f2fs_grab_read_bio' makes pointer from integer without a cast [-Wint-conversion]
 2557 |                         bio = f2fs_grab_read_bio(inode, block_nr,
      |                                                         ^~~~~~~~
      |                                                         |
      |                                                         sector_t {aka long long unsigned int}
/tmp/next/build/fs/f2fs/data.c:1100:61: note: expected 'struct fsverity_info *' but argument is of type 'sector_t' {aka 'long long unsigned int'}
 1100 |                                       struct fsverity_info *vi, block_t blkaddr,
      |                                       ~~~~~~~~~~~~~~~~~~~~~~^~
/tmp/next/build/fs/f2fs/data.c:2557:31: error: too few arguments to function 'f2fs_grab_read_bio'
 2557 |                         bio = f2fs_grab_read_bio(inode, block_nr,
      |                               ^~~~~~~~~~~~~~~~~~
/tmp/next/build/fs/f2fs/data.c:1099:20: note: declared here
 1099 | static struct bio *f2fs_grab_read_bio(struct inode *inode,
      |                    ^~~~~~~~~~~~~~~~~~

Caused by commit

   3428cd0a9498a (f2fs: consolidate fsverity_info lookup)

interacting with

   05e65c14ea59 (f2fs: support large folio for immutable non-compressed case)

I have (hopefully) fixed it up, see below, and can carry as needed.

From a954b589f2aa0da3f2522dbeaf342966190a4139 Mon Sep 17 00:00:00 2001
From: Mark Brown <[email-masked]>
Date: Tue, 3 Feb 2026 13:19:22 +0000
Subject: [PATCH] f2fs: Fix interaction with fsverity changes

/tmp/next/build/fs/f2fs/data.c: In function 'f2fs_read_data_large_folio':
/tmp/next/build/fs/f2fs/data.c:2525:51: error: passing argument 1 of 'fsverity_verify_page' from incompatible pointer type [-Wincompatible-pointer-types]
 2525 |                             !fsverity_verify_page(folio_file_page(folio,
      |                                                   ^~~~~~~~~~~~~~~~~~~~~~
      |                                                   |
      |                                                   struct page *
 2526 |                                                                 index))) {
      |                                                                 ~~~~~~
In file included from /tmp/next/build/fs/f2fs/f2fs.h:29,
                 from /tmp/next/build/fs/f2fs/data.c:24:
/tmp/next/build/include/linux/fsverity.h:285:63: note: expected 'struct fsverity_info *' but argument is of type 'struct page *'
  285 | static inline bool fsverity_verify_page(struct fsverity_info *vi,
      |                                         ~~~~~~~~~~~~~~~~~~~~~~^~
/tmp/next/build/fs/f2fs/data.c:2525:30: error: too few arguments to function 'fsverity_verify_page'
 2525 |                             !fsverity_verify_page(folio_file_page(folio,
      |                              ^~~~~~~~~~~~~~~~~~~~
/tmp/next/build/include/linux/fsverity.h:285:20: note: declared here
  285 | static inline bool fsverity_verify_page(struct fsverity_info *vi,
      |                    ^~~~~~~~~~~~~~~~~~~~
/tmp/next/build/fs/f2fs/data.c:2557:57: error: passing argument 2 of 'f2fs_grab_read_bio' makes pointer from integer without a cast [-Wint-conversion]
 2557 |                         bio = f2fs_grab_read_bio(inode, block_nr,
      |                                                         ^~~~~~~~
      |                                                         |
      |                                                         sector_t {aka long long unsigned int}
/tmp/next/build/fs/f2fs/data.c:1100:61: note: expected 'struct fsverity_info *' but argument is of type 'sector_t' {aka 'long long unsigned int'}
 1100 |                                       struct fsverity_info *vi, block_t blkaddr,
      |                                       ~~~~~~~~~~~~~~~~~~~~~~^~
/tmp/next/build/fs/f2fs/data.c:2557:31: error: too few arguments to function 'f2fs_grab_read_bio'
 2557 |                         bio = f2fs_grab_read_bio(inode, block_nr,
      |                               ^~~~~~~~~~~~~~~~~~
/tmp/next/build/fs/f2fs/data.c:1099:20: note: declared here
 1099 | static struct bio *f2fs_grab_read_bio(struct inode *inode,
      |                    ^~~~~~~~~~~~~~~~~~

Signed-off-by: Mark Brown <[email-masked]>
---
 fs/f2fs/data.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index d9085d1236d97..46b4f70f8faf5 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -2451,6 +2451,7 @@ static void ffs_detach_free(struct folio *folio)
 }
 
 static int f2fs_read_data_large_folio(struct inode *inode,
+		struct fsverity_info *vi,
 		struct readahead_control *rac, struct folio *folio)
 {
 	struct bio *bio = NULL;
@@ -2522,7 +2523,7 @@ static int f2fs_read_data_large_folio(struct inode *inode,
 		} else {
 			folio_zero_range(folio, offset << PAGE_SHIFT, PAGE_SIZE);
 			if (f2fs_need_verity(inode, index) &&
-			    !fsverity_verify_page(folio_file_page(folio,
+			    !fsverity_verify_page(vi, folio_file_page(folio,
 								index))) {
 				ret = -EIO;
 				goto err_out;
@@ -2554,7 +2555,7 @@ static int f2fs_read_data_large_folio(struct inode *inode,
 			bio = NULL;
 		}
 		if (bio == NULL)
-			bio = f2fs_grab_read_bio(inode, block_nr,
+			bio = f2fs_grab_read_bio(inode, vi, block_nr,
 					max_nr_pages,
 					f2fs_ra_op_flags(rac),
 					index, false);
@@ -2629,7 +2630,7 @@ static int f2fs_mpage_readpages(struct inode *inode, struct fsverity_info *vi,
 	int ret = 0;
 
 	if (mapping_large_folio_support(mapping))
-		return f2fs_read_data_large_folio(inode, rac, folio);
+		return f2fs_read_data_large_folio(inode, vi, rac, folio);
 
 #ifdef CONFIG_F2FS_FS_COMPRESSION
 	if (f2fs_compressed_file(inode)) {
-- 
2.47.3