Commit 847243a
ext4: factor out ext4_get_maxbytes()
commit dbe27f0 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>
(cherry picked from commit 68cea04f1fb2ead5e10e1be8be98cb1cb24334ba)1 parent b104bd8 commit 847243a
3 files changed
Lines changed: 9 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3351 | 3351 | | |
3352 | 3352 | | |
3353 | 3353 | | |
| 3354 | + | |
| 3355 | + | |
| 3356 | + | |
| 3357 | + | |
| 3358 | + | |
| 3359 | + | |
| 3360 | + | |
3354 | 3361 | | |
3355 | 3362 | | |
3356 | 3363 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4970 | 4970 | | |
4971 | 4971 | | |
4972 | 4972 | | |
4973 | | - | |
4974 | | - | |
4975 | | - | |
4976 | | - | |
4977 | | - | |
4978 | | - | |
| 4973 | + | |
4979 | 4974 | | |
4980 | 4975 | | |
4981 | 4976 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
898 | 898 | | |
899 | 899 | | |
900 | 900 | | |
901 | | - | |
902 | | - | |
903 | | - | |
904 | | - | |
905 | | - | |
906 | | - | |
| 901 | + | |
907 | 902 | | |
908 | 903 | | |
909 | 904 | | |
| |||
0 commit comments