Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fsverity: fix build error by adding fsverity_readahead() stub

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")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20260218012244.18536-1-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>

+7 -2
+7 -2
include/linux/fsverity.h
··· 195 195 196 196 /* verify.c */ 197 197 198 + void fsverity_readahead(struct fsverity_info *vi, pgoff_t index, 199 + unsigned long nr_pages); 198 200 bool fsverity_verify_blocks(struct fsverity_info *vi, struct folio *folio, 199 201 size_t len, size_t offset); 200 202 void fsverity_verify_bio(struct fsverity_info *vi, struct bio *bio); ··· 257 255 258 256 /* verify.c */ 259 257 258 + static inline void fsverity_readahead(struct fsverity_info *vi, pgoff_t index, 259 + unsigned long nr_pages) 260 + { 261 + } 262 + 260 263 static inline bool fsverity_verify_blocks(struct fsverity_info *vi, 261 264 struct folio *folio, size_t len, 262 265 size_t offset) ··· 310 303 } 311 304 312 305 void fsverity_cleanup_inode(struct inode *inode); 313 - void fsverity_readahead(struct fsverity_info *vi, pgoff_t index, 314 - unsigned long nr_pages); 315 306 316 307 struct page *generic_read_merkle_tree_page(struct inode *inode, pgoff_t index); 317 308 void generic_readahead_merkle_tree(struct inode *inode, pgoff_t index,