aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/page-io.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/page-io.c')
-rw-r--r--fs/ext4/page-io.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c
index b1758538b3b5..475851896518 100644
--- a/fs/ext4/page-io.c
+++ b/fs/ext4/page-io.c
@@ -384,6 +384,18 @@ int ext4_bio_write_page(struct ext4_io_submit *io,
384 384
385 block_end = block_start + blocksize; 385 block_end = block_start + blocksize;
386 if (block_start >= len) { 386 if (block_start >= len) {
387 /*
388 * Comments copied from block_write_full_page_endio:
389 *
390 * The page straddles i_size. It must be zeroed out on
391 * each and every writepage invocation because it may
392 * be mmapped. "A file is mapped in multiples of the
393 * page size. For a file that is not a multiple of
394 * the page size, the remaining memory is zeroed when
395 * mapped, and writes to that region are not written
396 * out to the file."
397 */
398 zero_user_segment(page, block_start, block_end);
387 clear_buffer_dirty(bh); 399 clear_buffer_dirty(bh);
388 set_buffer_uptodate(bh); 400 set_buffer_uptodate(bh);
389 continue; 401 continue;