diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-11-17 00:56:18 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-01-08 19:34:38 -0500 |
commit | e3029d9fd426c8f582210ba35551ae5506218345 (patch) | |
tree | 629376e0a5db20e91d5f6b40cc2ab26c2bc35883 /fs/btrfs/disk-io.c | |
parent | 6f07e42ee6fcc252a210781d7262f4051e9fd8f6 (diff) |
btrfs: sanitizing ->fs_info, part 5
close_ctree() uses a weird mix of accesses to root->fs_info and
its value at the beginning of function stored in local variable.
Since ->fs_info *never* changes, let's just use the local variable
to avoid confusion.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index ee846ce58846..9308c7f13c17 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -2982,7 +2982,7 @@ int close_ctree(struct btrfs_root *root) | |||
2982 | (atomic_read(&fs_info->defrag_running) == 0)); | 2982 | (atomic_read(&fs_info->defrag_running) == 0)); |
2983 | 2983 | ||
2984 | /* clear out the rbtree of defraggable inodes */ | 2984 | /* clear out the rbtree of defraggable inodes */ |
2985 | btrfs_run_defrag_inodes(root->fs_info); | 2985 | btrfs_run_defrag_inodes(fs_info); |
2986 | 2986 | ||
2987 | /* | 2987 | /* |
2988 | * Here come 2 situations when btrfs is broken to flip readonly: | 2988 | * Here come 2 situations when btrfs is broken to flip readonly: |
@@ -3011,8 +3011,8 @@ int close_ctree(struct btrfs_root *root) | |||
3011 | 3011 | ||
3012 | btrfs_put_block_group_cache(fs_info); | 3012 | btrfs_put_block_group_cache(fs_info); |
3013 | 3013 | ||
3014 | kthread_stop(root->fs_info->transaction_kthread); | 3014 | kthread_stop(fs_info->transaction_kthread); |
3015 | kthread_stop(root->fs_info->cleaner_kthread); | 3015 | kthread_stop(fs_info->cleaner_kthread); |
3016 | 3016 | ||
3017 | fs_info->closing = 2; | 3017 | fs_info->closing = 2; |
3018 | smp_mb(); | 3018 | smp_mb(); |
@@ -3030,14 +3030,14 @@ int close_ctree(struct btrfs_root *root) | |||
3030 | free_extent_buffer(fs_info->extent_root->commit_root); | 3030 | free_extent_buffer(fs_info->extent_root->commit_root); |
3031 | free_extent_buffer(fs_info->tree_root->node); | 3031 | free_extent_buffer(fs_info->tree_root->node); |
3032 | free_extent_buffer(fs_info->tree_root->commit_root); | 3032 | free_extent_buffer(fs_info->tree_root->commit_root); |
3033 | free_extent_buffer(root->fs_info->chunk_root->node); | 3033 | free_extent_buffer(fs_info->chunk_root->node); |
3034 | free_extent_buffer(root->fs_info->chunk_root->commit_root); | 3034 | free_extent_buffer(fs_info->chunk_root->commit_root); |
3035 | free_extent_buffer(root->fs_info->dev_root->node); | 3035 | free_extent_buffer(fs_info->dev_root->node); |
3036 | free_extent_buffer(root->fs_info->dev_root->commit_root); | 3036 | free_extent_buffer(fs_info->dev_root->commit_root); |
3037 | free_extent_buffer(root->fs_info->csum_root->node); | 3037 | free_extent_buffer(fs_info->csum_root->node); |
3038 | free_extent_buffer(root->fs_info->csum_root->commit_root); | 3038 | free_extent_buffer(fs_info->csum_root->commit_root); |
3039 | 3039 | ||
3040 | btrfs_free_block_groups(root->fs_info); | 3040 | btrfs_free_block_groups(fs_info); |
3041 | 3041 | ||
3042 | del_fs_roots(fs_info); | 3042 | del_fs_roots(fs_info); |
3043 | 3043 | ||