]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ext4: factor out ext4_get_maxbytes()
authorZhang Yi <yi.zhang@huawei.com>
Tue, 6 May 2025 01:20:08 +0000 (09:20 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:11:20 +0000 (11:11 +0100)
commitb841ca8c8fa93a16880e0c28068adb69704f2aba
treef9ea1f77decb010783ade6771ab523ed6bf03ff3
parent796632e6f8298cad413f0b77f12a3f16333c2eda
ext4: factor out ext4_get_maxbytes()

commit dbe27f06fa38b9bfc598f8864ae1c5d5831d9992 upstream.

There are several locations that get the correct maxbytes value based on
the inode's block type. It would be beneficial to extract a common
helper function to make the code more clear.

Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Baokun Li <libaokun1@huawei.com>
Link: https://patch.msgid.link/20250506012009.3896990-3-yi.zhang@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/ext4.h
fs/ext4/extents.c
fs/ext4/file.c