mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:24:47 +01:00
fsverity fixes for v7.0-rc1
- Fix a build error on parisc - Remove the non-large-folio-aware function fsverity_verify_page() -----BEGIN PGP SIGNATURE----- iIoEABYIADIWIQSacvsUNc7UX4ntmEPzXCl4vpKOKwUCaZtg+xQcZWJpZ2dlcnNA a2VybmVsLm9yZwAKCRDzXCl4vpKOKwQ+AQCiXEYAibl3vHRgQo7qEPCC5or4FtkF HZ0ERRArhsU17AD/TKHE/AJkyFrwK4rGTb6I9Wi1OXnpG7jihZlYjj03Ag4= =CUql -----END PGP SIGNATURE----- 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()
This commit is contained in:
commit
fbf3380361
3 changed files with 14 additions and 16 deletions
|
|
@ -1813,15 +1813,14 @@ static void f2fs_verify_cluster(struct work_struct *work)
|
||||||
/* Verify, update, and unlock the decompressed pages. */
|
/* Verify, update, and unlock the decompressed pages. */
|
||||||
for (i = 0; i < dic->cluster_size; i++) {
|
for (i = 0; i < dic->cluster_size; i++) {
|
||||||
struct page *rpage = dic->rpages[i];
|
struct page *rpage = dic->rpages[i];
|
||||||
|
struct folio *rfolio;
|
||||||
|
|
||||||
if (!rpage)
|
if (!rpage)
|
||||||
continue;
|
continue;
|
||||||
|
rfolio = page_folio(rpage);
|
||||||
if (fsverity_verify_page(dic->vi, rpage))
|
if (fsverity_verify_folio(dic->vi, rfolio))
|
||||||
SetPageUptodate(rpage);
|
folio_mark_uptodate(rfolio);
|
||||||
else
|
folio_unlock(rfolio);
|
||||||
ClearPageUptodate(rpage);
|
|
||||||
unlock_page(rpage);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
f2fs_put_dic(dic, true);
|
f2fs_put_dic(dic, true);
|
||||||
|
|
|
||||||
|
|
@ -442,8 +442,8 @@ EXPORT_SYMBOL_GPL(fsverity_verify_blocks);
|
||||||
* This is a helper function for use by the ->readahead() method of filesystems
|
* 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
|
* 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
|
* populate the page cache without issuing bios (e.g. non block-based
|
||||||
* filesystems) must instead call fsverity_verify_page() directly on each page.
|
* filesystems) must instead call fsverity_verify_blocks() directly. All
|
||||||
* All filesystems must also call fsverity_verify_page() on holes.
|
* filesystems must also call fsverity_verify_blocks() on holes.
|
||||||
*/
|
*/
|
||||||
void fsverity_verify_bio(struct fsverity_info *vi, struct bio *bio)
|
void fsverity_verify_bio(struct fsverity_info *vi, struct bio *bio)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -195,6 +195,8 @@ int fsverity_ioctl_read_metadata(struct file *filp, const void __user *uarg);
|
||||||
|
|
||||||
/* verify.c */
|
/* 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,
|
bool fsverity_verify_blocks(struct fsverity_info *vi, struct folio *folio,
|
||||||
size_t len, size_t offset);
|
size_t len, size_t offset);
|
||||||
void fsverity_verify_bio(struct fsverity_info *vi, struct bio *bio);
|
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 */
|
/* 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,
|
static inline bool fsverity_verify_blocks(struct fsverity_info *vi,
|
||||||
struct folio *folio, size_t len,
|
struct folio *folio, size_t len,
|
||||||
size_t offset)
|
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);
|
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
|
* fsverity_file_open() - prepare to open a verity file
|
||||||
* @inode: the inode being opened
|
* @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_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);
|
struct page *generic_read_merkle_tree_page(struct inode *inode, pgoff_t index);
|
||||||
void generic_readahead_merkle_tree(struct inode *inode, pgoff_t index,
|
void generic_readahead_merkle_tree(struct inode *inode, pgoff_t index,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue