ANDROID: Incremental fs: Mark merkle tree pages uptodate

The merkle tree pages at the end of the incremental files were being
zero'd and marked uptodate on 5.15. Mark uptodate on creation to prevent
this.

Bug: 197663427
Test: The test in that bug now passes on 5.15 kernel
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: I5c0781c51bfbc64929e7a465db1ae975ce5928f9
This commit is contained in:
Paul Lawrence
2022-02-01 17:56:46 +00:00
parent 8920ba7401
commit 68d2a58b28

View File

@@ -720,6 +720,7 @@ static int validate_hash_tree(struct backing_file_context *bfc, struct file *f,
memcpy(stored_digest, addr + hash_offset_in_block[lvl],
digest_size);
kunmap_atomic(addr);
put_page(page);
continue;
@@ -767,6 +768,7 @@ static int validate_hash_tree(struct backing_file_context *bfc, struct file *f,
memcpy(addr, buf, INCFS_DATA_FILE_BLOCK_SIZE);
kunmap_atomic(addr);
SetPageChecked(page);
SetPageUptodate(page);
unlock_page(page);
put_page(page);
}