summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorZhang Yi <yi.zhang@huawei.com>2026-10-09 18:30:27 +0800
committerTheodore Ts'o <tytso@mit.edu>2026-10-15 10:53:13 -0400
commit2309d96c93ce5c4eb243757eb6b5805fb57d831f (patch)
tree42808290fb84fe0e04020fcafb8682a1aa2f9be1 /scripts/Makefile.thinlto
parent09e4d8701614d2c524d96a88c4ff694f42b9a180 (diff)
downloadlinux-2309d96c93ce5c4eb243757eb6b5805fb57d831f.tar.gz
linux-2309d96c93ce5c4eb243757eb6b5805fb57d831f.zip
ext4: clear DISKSIZE_GROW_PENDING on truncate or error
The disksize-grow-pending state is set when a zeroed EOF block is queued for writeback and cleared by the ioend completion path once writeback finishes. However, the zeroed block may be discarded before writeback completes — through folio discard, truncate, or unlink and inode eviction. In any of these cases, leaving the bit set would block subsequent writeback indefinitely. Therefore, we must clear it on all paths that invalidate the pending block before writeback completes: - In ext4_iomap_discard_folio(), on folio discard. - In ext4_evict_inode(), when an unlinked inode is destroyed (don't bother with an inode that has nlink > 0, since it is only evicted after its dirty pages have been written out, and also don't bother with bad inodes, since they can never have the bit set). In ext4_truncate_down(), truncating past the pending zeroed EOF block also invalidates the pending disksize update, so the bit must be cleared there as well. Finally, add a WARN_ON in ext4_destroy_inode() to catch any inode destroyed with the bit still set. The check is skipped when the filesystem is in an error or emergency state, as the pending block may not have been written back in those cases. Note that EXT4_STATE_DISKSIZE_GROW_PENDING is not set for now, and it will be set after everthing is done. Signed-off-by: Zhang Yi <yi.zhang@huawei.com> Tested-by: syzbot@syzkaller.appspotmail.com Link: https://patch.msgid.link/20261009103033.2920530-27-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions