Btrfs: Add delayed iput
iput() can trigger new transactions if we are dropping the final reference, so calling it in btrfs_commit_transaction may end up deadlock. This patch adds delayed iput to avoid the issue. Signed-off-by: Yan Zheng <zheng.yan@oracle.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
@@ -3541,8 +3541,8 @@ int btrfs_relocate_block_group(struct btrfs_root *extent_root, u64 group_start)
|
||||
(unsigned long long)rc->block_group->key.objectid,
|
||||
(unsigned long long)rc->block_group->flags);
|
||||
|
||||
btrfs_start_delalloc_inodes(fs_info->tree_root);
|
||||
btrfs_wait_ordered_extents(fs_info->tree_root, 0);
|
||||
btrfs_start_delalloc_inodes(fs_info->tree_root, 0);
|
||||
btrfs_wait_ordered_extents(fs_info->tree_root, 0, 0);
|
||||
|
||||
while (1) {
|
||||
rc->extents_found = 0;
|
||||
|
Reference in New Issue
Block a user