Commit ed9b3e33 authored by Aneesh Kumar K.V's avatar Aneesh Kumar K.V Committed by Theodore Ts'o

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: default avatarAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent ac51d837
...@@ -2329,6 +2329,8 @@ static int ext4_da_writepage(struct page *page, ...@@ -2329,6 +2329,8 @@ static int ext4_da_writepage(struct page *page,
unlock_page(page); unlock_page(page);
return 0; 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)) if (test_opt(inode->i_sb, NOBH) && ext4_should_writeback_data(inode))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment