]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ext4: move out inode_lock into ext4_fallocate()
authorZhang Yi <yi.zhang@huawei.com>
Fri, 20 Dec 2024 01:16:36 +0000 (09:16 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 10 Feb 2025 12:48:25 +0000 (07:48 -0500)
commitea3f17efd36b56c5839289716ba83eaa85893590
treedce8b70f9d4b97509de84c7b5faa68d25015cb5f
parentfd2f764826df5489b849a8937b5a093aae5b1816
ext4: move out inode_lock into ext4_fallocate()

Currently, all five sub-functions of ext4_fallocate() acquire the
inode's i_rwsem at the beginning and release it before exiting. This
process can be simplified by factoring out the management of i_rwsem
into the ext4_fallocate() function.

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