]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ext4: fix races of writeback with punch hole and zero range
authorJan Kara <jack@suse.com>
Mon, 7 Dec 2015 19:34:49 +0000 (14:34 -0500)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 26 May 2016 22:45:45 +0000 (15:45 -0700)
commitbd418fd15885e7f25940fe7431025eb49ae94b22
tree4f820d4a933c092e6d27331cebf162952aeb38ee
parent1b0baafb550a9b2ffa5848a5c7a8122abcb1cc08
ext4: fix races of writeback with punch hole and zero range

Orabug: 23331012

When doing delayed allocation, update of on-disk inode size is postponed
until IO submission time. However hole punch or zero range fallocate
calls can end up discarding the tail page cache page and thus on-disk
inode size would never be properly updated.

Make sure the on-disk inode size is updated before truncating page
cache.

Signed-off-by: Jan Kara <jack@suse.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Mingming Cao <mingming.cao@oracle.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
(cherry picked from commit f2b132595b89d9236b386e1d6ed3fcf5e9edf4cb)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
fs/ext4/ext4.h
fs/ext4/extents.c
fs/ext4/inode.c