From: Aneesh Kumar K.V Date: Fri, 7 Nov 2008 14:06:45 +0000 (-0500) Subject: ext4: Mark the buffer_heads as dirty and uptodate after prepare_write X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ed9b3e3379731e9f9d2f73f3d7fd9e7d2ce3df4a;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Signed-off-by: "Theodore Ts'o" --- diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 5a130b56f1cf..be21a5ae33cb 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -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))