mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 13:41:30 +00:00
Btrfs: hold trans_mutex when using btrfs_record_root_in_trans
btrfs_record_root_in_trans needs the trans_mutex held to make sure two callers don't race to setup the root in a given transaction. This adds it to all the places that were missing it. Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
This commit is contained in:
parent
4008c04a07
commit
2456242530
3 changed files with 6 additions and 0 deletions
|
@ -5658,7 +5658,9 @@ static noinline int relocate_one_extent(struct btrfs_root *extent_root,
|
|||
prev_block = block_start;
|
||||
}
|
||||
|
||||
mutex_lock(&extent_root->fs_info->trans_mutex);
|
||||
btrfs_record_root_in_trans(found_root);
|
||||
mutex_unlock(&extent_root->fs_info->trans_mutex);
|
||||
if (ref_path->owner_objectid >= BTRFS_FIRST_FREE_OBJECTID) {
|
||||
/*
|
||||
* try to update data extent references while
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue