diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2008-11-07 17:06:45 +0300 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2008-11-07 17:06:45 +0300 |
commit | ed9b3e3379731e9f9d2f73f3d7fd9e7d2ce3df4a (patch) | |
tree | d17381e45fe8843646ca70424095a9aa36711ee7 /fs/ext4 | |
parent | ac51d83705c2a38c71f39cde99708b14e6212a60 (diff) | |
download | linux-ed9b3e3379731e9f9d2f73f3d7fd9e7d2ce3df4a.tar.xz |
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>
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/inode.c | 2 |
1 files changed, 2 insertions, 0 deletions
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)) |