]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ext4: refactor ext4_zero_range()
authorZhang Yi <yi.zhang@huawei.com>
Fri, 20 Dec 2024 01:16:32 +0000 (09:16 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 10 Feb 2025 12:48:25 +0000 (07:48 -0500)
commit53471e0bedad5891b860d02233819dc0e28189e2
tree6e26391c6000b5f6ec2d93aedb390378dee6f1eb
parent982bf37da09d078570650b691d9084f43805a5de
ext4: refactor ext4_zero_range()

The current implementation of ext4_zero_range() contains complex
position calculations and stale error tags. To improve the code's
clarity and maintainability, it is essential to clean up the code and
improve its readability, this can be achieved by: a) simplifying and
renaming variables, making the style the same as ext4_punch_hole(); b)
eliminating unnecessary position calculations, writing back all data in
data=journal mode, and drop page cache from the original offset to the
end, rather than using aligned blocks; c) renaming the stale out_mutex
tags.

Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Link: https://patch.msgid.link/20241220011637.1157197-6-yi.zhang@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/extents.c