diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-06-14 01:34:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-06-14 01:34:14 -0400 |
commit | a2648ebb7ed69ef209d9c8a76fadeb3252d9a023 (patch) | |
tree | 9a8e75db208395b8de1a2e6e5045abf56e8677a0 /fs/btrfs/disk-io.c | |
parent | 33c929c06eb4a483a3e4ffbff58f6e4f31ae4565 (diff) | |
parent | 13e6c37b989859e70b0d73d3f2cb0aa022159b17 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
Pull btrfs fixes from Chris Mason:
"This is an assortment of crash fixes"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
Btrfs: stop all workers before cleaning up roots
Btrfs: fix use-after-free bug during umount
Btrfs: init relocate extent_io_tree with a mapping
btrfs: Drop inode if inode root is NULL
Btrfs: don't delete fs_roots until after we cleanup the transaction
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index e7b3cb5286a5..b8b60b660c8f 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -2859,8 +2859,8 @@ fail_qgroup: | |||
2859 | btrfs_free_qgroup_config(fs_info); | 2859 | btrfs_free_qgroup_config(fs_info); |
2860 | fail_trans_kthread: | 2860 | fail_trans_kthread: |
2861 | kthread_stop(fs_info->transaction_kthread); | 2861 | kthread_stop(fs_info->transaction_kthread); |
2862 | del_fs_roots(fs_info); | ||
2863 | btrfs_cleanup_transaction(fs_info->tree_root); | 2862 | btrfs_cleanup_transaction(fs_info->tree_root); |
2863 | del_fs_roots(fs_info); | ||
2864 | fail_cleaner: | 2864 | fail_cleaner: |
2865 | kthread_stop(fs_info->cleaner_kthread); | 2865 | kthread_stop(fs_info->cleaner_kthread); |
2866 | 2866 | ||
@@ -3512,15 +3512,15 @@ int close_ctree(struct btrfs_root *root) | |||
3512 | percpu_counter_sum(&fs_info->delalloc_bytes)); | 3512 | percpu_counter_sum(&fs_info->delalloc_bytes)); |
3513 | } | 3513 | } |
3514 | 3514 | ||
3515 | free_root_pointers(fs_info, 1); | ||
3516 | |||
3517 | btrfs_free_block_groups(fs_info); | 3515 | btrfs_free_block_groups(fs_info); |
3518 | 3516 | ||
3517 | btrfs_stop_all_workers(fs_info); | ||
3518 | |||
3519 | del_fs_roots(fs_info); | 3519 | del_fs_roots(fs_info); |
3520 | 3520 | ||
3521 | iput(fs_info->btree_inode); | 3521 | free_root_pointers(fs_info, 1); |
3522 | 3522 | ||
3523 | btrfs_stop_all_workers(fs_info); | 3523 | iput(fs_info->btree_inode); |
3524 | 3524 | ||
3525 | #ifdef CONFIG_BTRFS_FS_CHECK_INTEGRITY | 3525 | #ifdef CONFIG_BTRFS_FS_CHECK_INTEGRITY |
3526 | if (btrfs_test_opt(root, CHECK_INTEGRITY)) | 3526 | if (btrfs_test_opt(root, CHECK_INTEGRITY)) |