mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 02:39:48 +00:00
btrfs: Use fs_info directly in btrfs_delete_unused_bgs
No need to use root->fs_info in btrfs_delete_unused_bgs(), use fs_info directly instead. Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com> Signed-off-by: Chris Mason <clm@fb.com>
This commit is contained in:
parent
2c9fe83552
commit
d5f2e33b92
1 changed files with 2 additions and 2 deletions
|
@ -10289,7 +10289,7 @@ void btrfs_delete_unused_bgs(struct btrfs_fs_info *fs_info)
|
|||
}
|
||||
spin_unlock(&fs_info->unused_bgs_lock);
|
||||
|
||||
mutex_lock(&root->fs_info->delete_unused_bgs_mutex);
|
||||
mutex_lock(&fs_info->delete_unused_bgs_mutex);
|
||||
|
||||
/* Don't want to race with allocators so take the groups_sem */
|
||||
down_write(&space_info->groups_sem);
|
||||
|
@ -10413,7 +10413,7 @@ void btrfs_delete_unused_bgs(struct btrfs_fs_info *fs_info)
|
|||
end_trans:
|
||||
btrfs_end_transaction(trans, root);
|
||||
next:
|
||||
mutex_unlock(&root->fs_info->delete_unused_bgs_mutex);
|
||||
mutex_unlock(&fs_info->delete_unused_bgs_mutex);
|
||||
btrfs_put_block_group(block_group);
|
||||
spin_lock(&fs_info->unused_bgs_lock);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue