]> www.infradead.org Git - users/hch/misc.git/commit
ext4: move out common parts into ext4_fallocate()
authorZhang Yi <yi.zhang@huawei.com>
Fri, 20 Dec 2024 01:16:37 +0000 (09:16 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 10 Feb 2025 12:48:25 +0000 (07:48 -0500)
commit2890e5e0f49e10f3dadc5f7b7ea434e3e77e12a6
tree3307ace0891414471ec09e04fb6c1aef169bee96
parentea3f17efd36b56c5839289716ba83eaa85893590
ext4: move out common parts into ext4_fallocate()

Currently, all zeroing ranges, punch holes, collapse ranges, and insert
ranges first wait for all existing direct I/O workers to complete, and
then they acquire the mapping's invalidate lock before performing the
actual work. These common components are nearly identical, so we can
simplify the code by factoring them out into the ext4_fallocate().

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-11-yi.zhang@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/extents.c
fs/ext4/inode.c