Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ext4: remove ctime/mtime update from ext4_alloc_file_blocks()

The ctime and mtime update is already handled by file_modified() in
ext4_fallocate(), the caller of ext4_alloc_file_blocks(). So remove the
redundant calls to inode_set_ctime_current() and inode_set_mtime_to_ts()
in ext4_alloc_file_blocks().

Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20260327102939.1095257-12-yi.zhang@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>

authored by

Zhang Yi and committed by
Theodore Ts'o
116c0bda c3688d21

+1 -4
+1 -4
fs/ext4/extents.c
··· 4652 4652 */ 4653 4653 retries = 0; 4654 4654 epos = EXT4_LBLK_TO_B(inode, map.m_lblk + ret); 4655 - inode_set_ctime_current(inode); 4656 4655 if (new_size) { 4657 4656 if (epos > new_size) 4658 4657 epos = new_size; 4659 - if (ext4_update_inode_size(inode, epos) & 0x1) 4660 - inode_set_mtime_to_ts(inode, 4661 - inode_get_ctime(inode)); 4658 + ext4_update_inode_size(inode, epos); 4662 4659 if (epos > old_size) 4663 4660 pagecache_isize_extended(inode, old_size, epos); 4664 4661 }