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.

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()

+14 -16
+5 -6
fs/f2fs/compress.c
··· 1813 1813 /* Verify, update, and unlock the decompressed pages. */ 1814 1814 for (i = 0; i < dic->cluster_size; i++) { 1815 1815 struct page *rpage = dic->rpages[i]; 1816 + struct folio *rfolio; 1816 1817 1817 1818 if (!rpage) 1818 1819 continue; 1819 - 1820 - if (fsverity_verify_page(dic->vi, rpage)) 1821 - SetPageUptodate(rpage); 1822 - else 1823 - ClearPageUptodate(rpage); 1824 - unlock_page(rpage); 1820 + rfolio = page_folio(rpage); 1821 + if (fsverity_verify_folio(dic->vi, rfolio)) 1822 + folio_mark_uptodate(rfolio); 1823 + folio_unlock(rfolio); 1825 1824 } 1826 1825 1827 1826 f2fs_put_dic(dic, true);
+2 -2
fs/verity/verify.c
··· 442 442 * This is a helper function for use by the ->readahead() method of filesystems 443 443 * that issue bios to read data directly into the page cache. Filesystems that 444 444 * populate the page cache without issuing bios (e.g. non block-based 445 - * filesystems) must instead call fsverity_verify_page() directly on each page. 446 - * All filesystems must also call fsverity_verify_page() on holes. 445 + * filesystems) must instead call fsverity_verify_blocks() directly. All 446 + * filesystems must also call fsverity_verify_blocks() on holes. 447 447 */ 448 448 void fsverity_verify_bio(struct fsverity_info *vi, struct bio *bio) 449 449 {
+7 -8
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) ··· 289 282 return fsverity_verify_blocks(vi, folio, folio_size(folio), 0); 290 283 } 291 284 292 - static inline bool fsverity_verify_page(struct fsverity_info *vi, 293 - struct page *page) 294 - { 295 - return fsverity_verify_blocks(vi, page_folio(page), PAGE_SIZE, 0); 296 - } 297 - 298 285 /** 299 286 * fsverity_file_open() - prepare to open a verity file 300 287 * @inode: the inode being opened ··· 310 309 } 311 310 312 311 void fsverity_cleanup_inode(struct inode *inode); 313 - void fsverity_readahead(struct fsverity_info *vi, pgoff_t index, 314 - unsigned long nr_pages); 315 312 316 313 struct page *generic_read_merkle_tree_page(struct inode *inode, pgoff_t index); 317 314 void generic_readahead_merkle_tree(struct inode *inode, pgoff_t index,