From 9d2f688e65dbebc43f9bdaf9d4455bb893811e13 Mon Sep 17 00:00:00 2001 From: Paul Lawrence Date: Tue, 1 Feb 2022 17:56:46 +0000 Subject: [PATCH] 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 Change-Id: I5c0781c51bfbc64929e7a465db1ae975ce5928f9 (cherry picked from commit 68d2a58b28ecad58340643ebab511ecd2689c2b1) --- fs/incfs/data_mgmt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/incfs/data_mgmt.c b/fs/incfs/data_mgmt.c index a3c782a76e18..7d8b25954c98 100644 --- a/fs/incfs/data_mgmt.c +++ b/fs/incfs/data_mgmt.c @@ -719,6 +719,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; @@ -766,6 +767,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); }