+1
−1
+4
−2
+1
−1
+4
−4
Loading
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>