Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+13 -9
+5 -5
fs/btrfs/disk-io.c
··· 2859 2859 btrfs_free_qgroup_config(fs_info); 2860 2860 fail_trans_kthread: 2861 2861 kthread_stop(fs_info->transaction_kthread); 2862 - del_fs_roots(fs_info); 2863 2862 btrfs_cleanup_transaction(fs_info->tree_root); 2863 + del_fs_roots(fs_info); 2864 2864 fail_cleaner: 2865 2865 kthread_stop(fs_info->cleaner_kthread); 2866 2866 ··· 3512 3512 percpu_counter_sum(&fs_info->delalloc_bytes)); 3513 3513 } 3514 3514 3515 - free_root_pointers(fs_info, 1); 3516 - 3517 3515 btrfs_free_block_groups(fs_info); 3516 + 3517 + btrfs_stop_all_workers(fs_info); 3518 3518 3519 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 3525 #ifdef CONFIG_BTRFS_FS_CHECK_INTEGRITY 3526 3526 if (btrfs_test_opt(root, CHECK_INTEGRITY))
+3
fs/btrfs/inode.c
··· 8012 8012 { 8013 8013 struct btrfs_root *root = BTRFS_I(inode)->root; 8014 8014 8015 + if (root == NULL) 8016 + return 1; 8017 + 8015 8018 /* the snap/subvol tree is on deleting */ 8016 8019 if (btrfs_root_refs(&root->root_item) == 0 && 8017 8020 root != root->fs_info->tree_root)
+5 -4
fs/btrfs/relocation.c
··· 4082 4082 return inode; 4083 4083 } 4084 4084 4085 - static struct reloc_control *alloc_reloc_control(void) 4085 + static struct reloc_control *alloc_reloc_control(struct btrfs_fs_info *fs_info) 4086 4086 { 4087 4087 struct reloc_control *rc; 4088 4088 ··· 4093 4093 INIT_LIST_HEAD(&rc->reloc_roots); 4094 4094 backref_cache_init(&rc->backref_cache); 4095 4095 mapping_tree_init(&rc->reloc_root_tree); 4096 - extent_io_tree_init(&rc->processed_blocks, NULL); 4096 + extent_io_tree_init(&rc->processed_blocks, 4097 + fs_info->btree_inode->i_mapping); 4097 4098 return rc; 4098 4099 } 4099 4100 ··· 4111 4110 int rw = 0; 4112 4111 int err = 0; 4113 4112 4114 - rc = alloc_reloc_control(); 4113 + rc = alloc_reloc_control(fs_info); 4115 4114 if (!rc) 4116 4115 return -ENOMEM; 4117 4116 ··· 4312 4311 if (list_empty(&reloc_roots)) 4313 4312 goto out; 4314 4313 4315 - rc = alloc_reloc_control(); 4314 + rc = alloc_reloc_control(root->fs_info); 4316 4315 if (!rc) { 4317 4316 err = -ENOMEM; 4318 4317 goto out;