mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 02:39:48 +00:00
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>
This commit is contained in:
parent
6f07e42ee6
commit
e3029d9fd4
1 changed files with 10 additions and 10 deletions
|
@ -2982,7 +2982,7 @@ int close_ctree(struct btrfs_root *root)
|
|||
(atomic_read(&fs_info->defrag_running) == 0));
|
||||
|
||||
/* clear out the rbtree of defraggable inodes */
|
||||
btrfs_run_defrag_inodes(root->fs_info);
|
||||
btrfs_run_defrag_inodes(fs_info);
|
||||
|
||||
/*
|
||||
* Here come 2 situations when btrfs is broken to flip readonly:
|
||||
|
@ -3011,8 +3011,8 @@ int close_ctree(struct btrfs_root *root)
|
|||
|
||||
btrfs_put_block_group_cache(fs_info);
|
||||
|
||||
kthread_stop(root->fs_info->transaction_kthread);
|
||||
kthread_stop(root->fs_info->cleaner_kthread);
|
||||
kthread_stop(fs_info->transaction_kthread);
|
||||
kthread_stop(fs_info->cleaner_kthread);
|
||||
|
||||
fs_info->closing = 2;
|
||||
smp_mb();
|
||||
|
@ -3030,14 +3030,14 @@ int close_ctree(struct btrfs_root *root)
|
|||
free_extent_buffer(fs_info->extent_root->commit_root);
|
||||
free_extent_buffer(fs_info->tree_root->node);
|
||||
free_extent_buffer(fs_info->tree_root->commit_root);
|
||||
free_extent_buffer(root->fs_info->chunk_root->node);
|
||||
free_extent_buffer(root->fs_info->chunk_root->commit_root);
|
||||
free_extent_buffer(root->fs_info->dev_root->node);
|
||||
free_extent_buffer(root->fs_info->dev_root->commit_root);
|
||||
free_extent_buffer(root->fs_info->csum_root->node);
|
||||
free_extent_buffer(root->fs_info->csum_root->commit_root);
|
||||
free_extent_buffer(fs_info->chunk_root->node);
|
||||
free_extent_buffer(fs_info->chunk_root->commit_root);
|
||||
free_extent_buffer(fs_info->dev_root->node);
|
||||
free_extent_buffer(fs_info->dev_root->commit_root);
|
||||
free_extent_buffer(fs_info->csum_root->node);
|
||||
free_extent_buffer(fs_info->csum_root->commit_root);
|
||||
|
||||
btrfs_free_block_groups(root->fs_info);
|
||||
btrfs_free_block_groups(fs_info);
|
||||
|
||||
del_fs_roots(fs_info);
|
||||
|
||||
|
|
Loading…
Reference in a new issue