mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-20 08:38:24 +08:00
ext4: Mark the buffer_heads as dirty and uptodate after prepare_write
We need to make sure we mark the buffer_heads as dirty and uptodate so that block_write_full_page write them correctly. This fixes mmap corruptions that can occur in low memory situations. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
parent
ac51d83705
commit
ed9b3e3379
@ -2329,6 +2329,8 @@ static int ext4_da_writepage(struct page *page,
|
||||
unlock_page(page);
|
||||
return 0;
|
||||
}
|
||||
/* now mark the buffer_heads as dirty and uptodate */
|
||||
block_commit_write(page, 0, PAGE_CACHE_SIZE);
|
||||
}
|
||||
|
||||
if (test_opt(inode->i_sb, NOBH) && ext4_should_writeback_data(inode))
|
||||
|
Loading…
Reference in New Issue
Block a user