summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-22 13:12:04 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-22 13:12:04 -0800
commitfbf33803618ad4f531f78fe15cf328fe6c7f9978 (patch)
tree321a5d344815c73a2471590e09e198e501fe499e
parent75e1f66a9ed09f29c6883ea379c174e8cf31f7cc (diff)
parent693680b9add63dbebb2505a553ff52f8c706c8c0 (diff)
Merge tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fsverity/linux
Pull fsverity fixes from Eric Biggers: - Fix a build error on parisc - Remove the non-large-folio-aware function fsverity_verify_page() * tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fsverity/linux: fsverity: fix build error by adding fsverity_readahead() stub fsverity: remove fsverity_verify_page() f2fs: make f2fs_verify_cluster() partially large-folio-aware f2fs: remove unnecessary ClearPageUptodate in f2fs_verify_cluster()
-rw-r--r--fs/f2fs/compress.c11
-rw-r--r--fs/verity/verify.c4
-rw-r--r--include/linux/fsverity.h15
3 files changed, 14 insertions, 16 deletions
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
index 006a80acd1de..8c76400ba631 100644
--- a/fs/f2fs/compress.c
+++ b/fs/f2fs/compress.c
@@ -1813,15 +1813,14 @@ static void f2fs_verify_cluster(struct work_struct *work)
/* Verify, update, and unlock the decompressed pages. */
for (i = 0; i < dic->cluster_size; i++) {
struct page *rpage = dic->rpages[i];
+ struct folio *rfolio;
if (!rpage)
continue;
-
- if (fsverity_verify_page(dic->vi, rpage))
- SetPageUptodate(rpage);
- else
- ClearPageUptodate(rpage);
- unlock_page(rpage);
+ rfolio = page_folio(rpage);
+ if (fsverity_verify_folio(dic->vi, rfolio))
+ folio_mark_uptodate(rfolio);
+ folio_unlock(rfolio);
}
f2fs_put_dic(dic, true);
diff --git a/fs/verity/verify.c b/fs/verity/verify.c
index 404ab68aaf9b..4004a1d42875 100644
--- a/fs/verity/verify.c
+++ b/fs/verity/verify.c
@@ -442,8 +442,8 @@ EXPORT_SYMBOL_GPL(fsverity_verify_blocks);
* This is a helper function for use by the ->readahead() method of filesystems
* that issue bios to read data directly into the page cache. Filesystems that
* populate the page cache without issuing bios (e.g. non block-based
- * filesystems) must instead call fsverity_verify_page() directly on each page.
- * All filesystems must also call fsverity_verify_page() on holes.
+ * filesystems) must instead call fsverity_verify_blocks() directly. All
+ * filesystems must also call fsverity_verify_blocks() on holes.
*/
void fsverity_verify_bio(struct fsverity_info *vi, struct bio *bio)
{
diff --git a/include/linux/fsverity.h b/include/linux/fsverity.h
index fed91023bea9..a8f9aa75b792 100644
--- a/include/linux/fsverity.h
+++ b/include/linux/fsverity.h
@@ -195,6 +195,8 @@ 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);
@@ -255,6 +257,11 @@ static inline int fsverity_ioctl_read_metadata(struct file *filp,
/* 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)
@@ -282,12 +289,6 @@ static inline bool fsverity_verify_folio(struct fsverity_info *vi,
return fsverity_verify_blocks(vi, folio, folio_size(folio), 0);
}
-static inline bool fsverity_verify_page(struct fsverity_info *vi,
- struct page *page)
-{
- return fsverity_verify_blocks(vi, page_folio(page), PAGE_SIZE, 0);
-}
-
/**
* fsverity_file_open() - prepare to open a verity file
* @inode: the inode being opened
@@ -309,8 +310,6 @@ static inline int fsverity_file_open(struct inode *inode, struct file *filp)
}
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,