Commit [eeece4]  Maximize  Restore  History

ext4: fix zeroing of page during writeback

Tail of a page straddling inode size must be zeroed when being written
out due to POSIX requirement that modifications of mmaped page beyond
inode size must not be written to the file. ext4_bio_write_page() did
this only for blocks fully beyond inode size but didn't properly zero
blocks partially beyond inode size. Fix this.

The problem has been uncovered by mmap_11-4 test in openposix test suite
(part of LTP).

Reported-by: Xiaoguang Wang <>
Fixes: 5a0dc7365c240
Fixes: bd2d0210cf22f
Signed-off-by: Jan Kara <>
Signed-off-by: Theodore Ts'o <>

Jan Kara Jan Kara 2014-05-27

Theodore Ts'o Theodore Ts'o 2014-05-27

changed fs/ext4/page-io.c
fs/ext4/page-io.c Diff Switch to side-by-side view