Skip to content
Commit f2b13259 authored by Jan Kara's avatar Jan Kara Committed by Sasha Levin
Browse files

ext4: fix races of writeback with punch hole and zero range



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: default avatarJan Kara <jack@suse.com>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
Reviewed-by: default avatarMingming Cao <mingming.cao@oracle.com>
Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
parent 181aaebd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment