diff options
| author | Zhang Yi <yi.zhang@huawei.com> | 2026-03-27 18:29:38 +0800 |
|---|---|---|
| committer | Theodore Ts'o <tytso@mit.edu> | 2026-04-09 21:57:52 -0400 |
| commit | 1ad0f42823291bcac371dafd37533f5e8d92acc3 (patch) | |
| tree | c6bc6a1bd546ee6604ebc99c8d33456855fa79f1 /rust/kernel/alloc/allocator | |
| parent | 116c0bdac2ec059d91045ba3f57cc90cb1e3b71d (diff) | |
ext4: move pagecache_isize_extended() out of active handle
In ext4_alloc_file_blocks(), pagecache_isize_extended() is called under
an active handle and may also hold folio lock if the block size is
smaller than the folio size. This also breaks the "folio lock ->
transaction start" lock ordering for the upcoming iomap buffered I/O
path.
Therefore, move pagecache_isize_extended() outside of an active handle.
Additionally, it is unnecessary to update the file length during each
iteration of the allocation loop. Instead, update the file length only
to the position where the allocation is successful. Postpone updating
the inode size until after the allocation loop completes or is
interrupted due to an error.
Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20260327102939.1095257-13-yi.zhang@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'rust/kernel/alloc/allocator')
0 files changed, 0 insertions, 0 deletions
