Skip to content

Commit 693680b

Browse files
author
Eric Biggers
committed
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: 45dcb3a ("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>
1 parent 5959495 commit 693680b

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

include/linux/fsverity.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,8 @@ int fsverity_ioctl_read_metadata(struct file *filp, const void __user *uarg);
195195

196196
/* verify.c */
197197

198+
void fsverity_readahead(struct fsverity_info *vi, pgoff_t index,
199+
unsigned long nr_pages);
198200
bool fsverity_verify_blocks(struct fsverity_info *vi, struct folio *folio,
199201
size_t len, size_t offset);
200202
void fsverity_verify_bio(struct fsverity_info *vi, struct bio *bio);
@@ -255,6 +257,11 @@ static inline int fsverity_ioctl_read_metadata(struct file *filp,
255257

256258
/* verify.c */
257259

260+
static inline void fsverity_readahead(struct fsverity_info *vi, pgoff_t index,
261+
unsigned long nr_pages)
262+
{
263+
}
264+
258265
static inline bool fsverity_verify_blocks(struct fsverity_info *vi,
259266
struct folio *folio, size_t len,
260267
size_t offset)
@@ -303,8 +310,6 @@ static inline int fsverity_file_open(struct inode *inode, struct file *filp)
303310
}
304311

305312
void fsverity_cleanup_inode(struct inode *inode);
306-
void fsverity_readahead(struct fsverity_info *vi, pgoff_t index,
307-
unsigned long nr_pages);
308313

309314
struct page *generic_read_merkle_tree_page(struct inode *inode, pgoff_t index);
310315
void generic_readahead_merkle_tree(struct inode *inode, pgoff_t index,

0 commit comments

Comments
 (0)