diff options
author | Zhao Lei <zhaolei@cn.fujitsu.com> | 2015-10-08 06:46:44 -0400 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2015-11-10 22:27:24 -0500 |
commit | d5f2e33b92b10b8007be50b570a27e9bacfb4c3a (patch) | |
tree | 9e713b86956aaaf83db2f9fc3ed865f4cfb354c8 | |
parent | 2c9fe835525896077e7e6d8e416b97f2f868edef (diff) |
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>
-rw-r--r-- | fs/btrfs/extent-tree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index b77ffbc3a145..acf3ed11cfb6 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -10289,7 +10289,7 @@ void btrfs_delete_unused_bgs(struct btrfs_fs_info *fs_info) | |||
10289 | } | 10289 | } |
10290 | spin_unlock(&fs_info->unused_bgs_lock); | 10290 | spin_unlock(&fs_info->unused_bgs_lock); |
10291 | 10291 | ||
10292 | mutex_lock(&root->fs_info->delete_unused_bgs_mutex); | 10292 | mutex_lock(&fs_info->delete_unused_bgs_mutex); |
10293 | 10293 | ||
10294 | /* Don't want to race with allocators so take the groups_sem */ | 10294 | /* Don't want to race with allocators so take the groups_sem */ |
10295 | down_write(&space_info->groups_sem); | 10295 | down_write(&space_info->groups_sem); |
@@ -10413,7 +10413,7 @@ void btrfs_delete_unused_bgs(struct btrfs_fs_info *fs_info) | |||
10413 | end_trans: | 10413 | end_trans: |
10414 | btrfs_end_transaction(trans, root); | 10414 | btrfs_end_transaction(trans, root); |
10415 | next: | 10415 | next: |
10416 | mutex_unlock(&root->fs_info->delete_unused_bgs_mutex); | 10416 | mutex_unlock(&fs_info->delete_unused_bgs_mutex); |
10417 | btrfs_put_block_group(block_group); | 10417 | btrfs_put_block_group(block_group); |
10418 | spin_lock(&fs_info->unused_bgs_lock); | 10418 | spin_lock(&fs_info->unused_bgs_lock); |
10419 | } | 10419 | } |