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:
@@ -2832,7 +2832,9 @@ again:
|
||||
BUG_ON(!wc.replay_dest);
|
||||
|
||||
wc.replay_dest->log_root = log;
|
||||
mutex_lock(&fs_info->trans_mutex);
|
||||
btrfs_record_root_in_trans(wc.replay_dest);
|
||||
mutex_unlock(&fs_info->trans_mutex);
|
||||
ret = walk_log_tree(trans, log, &wc);
|
||||
BUG_ON(ret);
|
||||
|
||||
|
Reference in New Issue
Block a user