This is a note to let you know that I've just added the patch titled ext4: fix mmap data corruption when blocksize < pagesize to the 3.17-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: ext4-fix-mmap-data-corruption-when-blocksize-pagesize.patch and it can be found in the queue-3.17 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From d6320cbfc92910a3e5f10c42d98c231c98db4f60 Mon Sep 17 00:00:00 2001 From: Jan Kara <jack@xxxxxxx> Date: Wed, 1 Oct 2014 21:49:46 -0400 Subject: ext4: fix mmap data corruption when blocksize < pagesize From: Jan Kara <jack@xxxxxxx> commit d6320cbfc92910a3e5f10c42d98c231c98db4f60 upstream. Use truncate_isize_extended() when hole is being created in a file so that ->page_mkwrite() will get called for the partial tail page if it is mmaped (see the first patch in the series for details). Signed-off-by: Jan Kara <jack@xxxxxxx> Signed-off-by: Theodore Ts'o <tytso@xxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/ext4/inode.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -4536,8 +4536,12 @@ int ext4_setattr(struct dentry *dentry, ext4_orphan_del(NULL, inode); goto err_out; } - } else + } else { + loff_t oldsize = inode->i_size; + i_size_write(inode, attr->ia_size); + pagecache_isize_extended(inode, oldsize, inode->i_size); + } /* * Blocks are going to be removed from the inode. Wait Patches currently in stable-queue which might be from jack@xxxxxxx are queue-3.17/evm-check-xattr-value-length-and-type-in-evm_inode_setxattr.patch queue-3.17/ext4-don-t-check-quota-format-when-there-are-no-quota-files.patch queue-3.17/ext4-fix-oops-when-loading-block-bitmap-failed.patch queue-3.17/vfs-fix-data-corruption-when-blocksize-pagesize-for-mmaped-data.patch queue-3.17/ext4-fix-mmap-data-corruption-when-blocksize-pagesize.patch queue-3.17/ext4-don-t-orphan-or-truncate-the-boot-loader-inode.patch queue-3.17/ext4-fix-overflow-when-updating-superblock-backups-after-resize.patch queue-3.17/ext4-grab-missed-write_count-for-ext4_ioc_swap_boot.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html