]> git.ipfire.org Git - thirdparty/linux.git/commit
ext4: refactor mext_check_arguments()
authorZhang Yi <yi.zhang@huawei.com>
Mon, 13 Oct 2025 01:51:23 +0000 (09:51 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 6 Nov 2025 15:44:39 +0000 (10:44 -0500)
commit57c1df07f1ac2668a4e65796565adcbc6995f86c
tree7344d3def46d1b913e147c1b63d13516939fb5bc
parent22218516e462d59b27ffcfc9dd75d4f98e482c51
ext4: refactor mext_check_arguments()

When moving extents, mext_check_validity() performs some basic file
system and file checks. However, some essential checks need to be
performed after acquiring the i_rwsem are still scattered in
mext_check_arguments(). Move those checks into mext_check_validity() and
make it executes entirely under the i_rwsem to make the checks clearer.
Furthermore, rename mext_check_arguments() to mext_check_adjust_range(),
as it only performs checks and length adjustments on the move extent
range. Finally, also change the print message for the non-existent file
check to be consistent with other unsupported checks.

Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Message-ID: <20251013015128.499308-8-yi.zhang@huaweicloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/move_extent.c