Skip to content

Commit fbf3380

Browse files
committed
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()
2 parents 75e1f66 + 693680b commit fbf3380

File tree

3 files changed

+14
-16
lines changed

3 files changed

+14
-16
lines changed

fs/f2fs/compress.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1813,15 +1813,14 @@ static void f2fs_verify_cluster(struct work_struct *work)
18131813
/* Verify, update, and unlock the decompressed pages. */
18141814
for (i = 0; i < dic->cluster_size; i++) {
18151815
struct page *rpage = dic->rpages[i];
1816+
struct folio *rfolio;
18161817

18171818
if (!rpage)
18181819
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);
18251824
}
18261825

18271826
f2fs_put_dic(dic, true);

fs/verity/verify.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,8 +442,8 @@ EXPORT_SYMBOL_GPL(fsverity_verify_blocks);
442442
* This is a helper function for use by the ->readahead() method of filesystems
443443
* that issue bios to read data directly into the page cache. Filesystems that
444444
* 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.
447447
*/
448448
void fsverity_verify_bio(struct fsverity_info *vi, struct bio *bio)
449449
{

include/linux/fsverity.h

Lines changed: 7 additions & 8 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)
@@ -282,12 +289,6 @@ static inline bool fsverity_verify_folio(struct fsverity_info *vi,
282289
return fsverity_verify_blocks(vi, folio, folio_size(folio), 0);
283290
}
284291

285-
static inline bool fsverity_verify_page(struct fsverity_info *vi,
286-
struct page *page)
287-
{
288-
return fsverity_verify_blocks(vi, page_folio(page), PAGE_SIZE, 0);
289-
}
290-
291292
/**
292293
* fsverity_file_open() - prepare to open a verity file
293294
* @inode: the inode being opened
@@ -309,8 +310,6 @@ static inline int fsverity_file_open(struct inode *inode, struct file *filp)
309310
}
310311

311312
void fsverity_cleanup_inode(struct inode *inode);
312-
void fsverity_readahead(struct fsverity_info *vi, pgoff_t index,
313-
unsigned long nr_pages);
314313

315314
struct page *generic_read_merkle_tree_page(struct inode *inode, pgoff_t index);
316315
void generic_readahead_merkle_tree(struct inode *inode, pgoff_t index,

0 commit comments

Comments
 (0)