summaryrefslogtreecommitdiff
path: root/fs/ext4/verity.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/verity.c')
-rw-r--r--fs/ext4/verity.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ext4/verity.c b/fs/ext4/verity.c
index b051d19b5c8a..94442c690ca7 100644
--- a/fs/ext4/verity.c
+++ b/fs/ext4/verity.c
@@ -365,13 +365,14 @@ static struct page *ext4_read_merkle_tree_page(struct inode *inode,
pgoff_t index,
unsigned long num_ra_pages)
{
- DEFINE_READAHEAD(ractl, NULL, NULL, inode->i_mapping, index);
struct page *page;
index += ext4_verity_metadata_pos(inode) >> PAGE_SHIFT;
page = find_get_page_flags(inode->i_mapping, index, FGP_ACCESSED);
if (!page || !PageUptodate(page)) {
+ DEFINE_READAHEAD(ractl, NULL, NULL, inode->i_mapping, index);
+
if (page)
put_page(page);
else if (num_ra_pages > 1)