diff options
| author | Zhang Yi <yi.zhang@huawei.com> | 2025-10-13 09:51:19 +0800 |
|---|---|---|
| committer | Theodore Ts'o <tytso@mit.edu> | 2025-11-06 10:44:39 -0500 |
| commit | 7da5565cab4069b2b171dbfa7554b596a7fdf827 (patch) | |
| tree | d9f48d9cfff92f62a170cbdfc563c5d2763a19ae /fs/ext4/ext4.h | |
| parent | dd064d5101ea473d39c39ffaa8beeb8f47bbeb09 (diff) | |
ext4: make ext4_es_lookup_extent() pass out the extent seq counter
When querying extents in the extent status tree, we should hold the
data_sem if we want to obtain the sequence number as a valid cookie
simultaneously. However, currently, ext4_map_blocks() calls
ext4_es_lookup_extent() without holding data_sem. Therefore, we should
acquire i_es_lock instead, which also ensures that the sequence cookie
and the extent remain consistent. Consequently, make
ext4_es_lookup_extent() to pass out the sequence number when necessary.
Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Message-ID: <20251013015128.499308-4-yi.zhang@huaweicloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ext4.h')
0 files changed, 0 insertions, 0 deletions