public inbox for fsverity@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH] fsverity: fix build error by adding fsverity_readahead() stub
@ 2026-02-18  1:22 Eric Biggers
  2026-02-18  5:40 ` Christoph Hellwig
  2026-02-18 21:41 ` Eric Biggers
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Biggers @ 2026-02-18  1:22 UTC (permalink / raw)
  To: fsverity
  Cc: Christoph Hellwig, linux-f2fs-devel, linux-fsdevel, Eric Biggers,
	kernel test robot

hppa-linux-gcc 9.5.0 generates a call to fsverity_readahead() in
f2fs_readahead() when CONFIG_FS_VERITY=n, because it fails to do the
expected dead code elimination based on vi always being NULL.  Fix the
build error by adding an inline stub for fsverity_readahead().  Since
it's just for opportunistic readahead, just make it a no-op.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202602180838.pwICdY2r-lkp@intel.com/
Fixes: 45dcb3ac9832 ("f2fs: consolidate fsverity_info lookup")
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
---
 include/linux/fsverity.h | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/include/linux/fsverity.h b/include/linux/fsverity.h
index fed91023bea9..29bbc8c66159 100644
--- a/include/linux/fsverity.h
+++ b/include/linux/fsverity.h
@@ -193,10 +193,12 @@ int __fsverity_file_open(struct inode *inode, struct file *filp);
 
 int fsverity_ioctl_read_metadata(struct file *filp, const void __user *uarg);
 
 /* verify.c */
 
+void fsverity_readahead(struct fsverity_info *vi, pgoff_t index,
+			unsigned long nr_pages);
 bool fsverity_verify_blocks(struct fsverity_info *vi, struct folio *folio,
 			    size_t len, size_t offset);
 void fsverity_verify_bio(struct fsverity_info *vi, struct bio *bio);
 void fsverity_enqueue_verify_work(struct work_struct *work);
 
@@ -253,10 +255,15 @@ static inline int fsverity_ioctl_read_metadata(struct file *filp,
 	return -EOPNOTSUPP;
 }
 
 /* verify.c */
 
+static inline void fsverity_readahead(struct fsverity_info *vi, pgoff_t index,
+				      unsigned long nr_pages)
+{
+}
+
 static inline bool fsverity_verify_blocks(struct fsverity_info *vi,
 					  struct folio *folio, size_t len,
 					  size_t offset)
 {
 	WARN_ON_ONCE(1);
@@ -307,12 +314,10 @@ static inline int fsverity_file_open(struct inode *inode, struct file *filp)
 		return __fsverity_file_open(inode, filp);
 	return 0;
 }
 
 void fsverity_cleanup_inode(struct inode *inode);
-void fsverity_readahead(struct fsverity_info *vi, pgoff_t index,
-			unsigned long nr_pages);
 
 struct page *generic_read_merkle_tree_page(struct inode *inode, pgoff_t index);
 void generic_readahead_merkle_tree(struct inode *inode, pgoff_t index,
 				   unsigned long nr_pages);
 

base-commit: 2961f841b025fb234860bac26dfb7fa7cb0fb122
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] fsverity: fix build error by adding fsverity_readahead() stub
  2026-02-18  1:22 [PATCH] fsverity: fix build error by adding fsverity_readahead() stub Eric Biggers
@ 2026-02-18  5:40 ` Christoph Hellwig
  2026-02-18 21:41 ` Eric Biggers
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2026-02-18  5:40 UTC (permalink / raw)
  To: Eric Biggers; +Cc: fsverity, linux-f2fs-devel, linux-fsdevel, kernel test robot

On Tue, Feb 17, 2026 at 05:22:44PM -0800, Eric Biggers wrote:
> hppa-linux-gcc 9.5.0 generates a call to fsverity_readahead() in
> f2fs_readahead() when CONFIG_FS_VERITY=n, because it fails to do the
> expected dead code elimination based on vi always being NULL.  Fix the
> build error by adding an inline stub for fsverity_readahead().  Since
> it's just for opportunistic readahead, just make it a no-op.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202602180838.pwICdY2r-lkp@intel.com/

Pretty silly that we need it, but looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] fsverity: fix build error by adding fsverity_readahead() stub
  2026-02-18  1:22 [PATCH] fsverity: fix build error by adding fsverity_readahead() stub Eric Biggers
  2026-02-18  5:40 ` Christoph Hellwig
@ 2026-02-18 21:41 ` Eric Biggers
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Biggers @ 2026-02-18 21:41 UTC (permalink / raw)
  To: fsverity
  Cc: Christoph Hellwig, linux-f2fs-devel, linux-fsdevel,
	kernel test robot

On Tue, Feb 17, 2026 at 05:22:44PM -0800, Eric Biggers wrote:
> hppa-linux-gcc 9.5.0 generates a call to fsverity_readahead() in
> f2fs_readahead() when CONFIG_FS_VERITY=n, because it fails to do the
> expected dead code elimination based on vi always being NULL.  Fix the
> build error by adding an inline stub for fsverity_readahead().  Since
> it's just for opportunistic readahead, just make it a no-op.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202602180838.pwICdY2r-lkp@intel.com/
> Fixes: 45dcb3ac9832 ("f2fs: consolidate fsverity_info lookup")
> Signed-off-by: Eric Biggers <ebiggers@kernel.org>
> ---
>  include/linux/fsverity.h | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 

Applied to https://git.kernel.org/pub/scm/fs/fsverity/linux.git/log/?h=for-next

- Eric

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-02-18 21:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-18  1:22 [PATCH] fsverity: fix build error by adding fsverity_readahead() stub Eric Biggers
2026-02-18  5:40 ` Christoph Hellwig
2026-02-18 21:41 ` Eric Biggers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox