diff options
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/btrfs/relocation.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 395b82031a42..4febca4fc2de 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c | |||
| @@ -4082,7 +4082,7 @@ out: | |||
| 4082 | return inode; | 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 | struct reloc_control *rc; | 4087 | struct reloc_control *rc; |
| 4088 | 4088 | ||
| @@ -4093,7 +4093,8 @@ static struct reloc_control *alloc_reloc_control(void) | |||
| 4093 | INIT_LIST_HEAD(&rc->reloc_roots); | 4093 | INIT_LIST_HEAD(&rc->reloc_roots); |
| 4094 | backref_cache_init(&rc->backref_cache); | 4094 | backref_cache_init(&rc->backref_cache); |
| 4095 | mapping_tree_init(&rc->reloc_root_tree); | 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 | return rc; | 4098 | return rc; |
| 4098 | } | 4099 | } |
| 4099 | 4100 | ||
| @@ -4110,7 +4111,7 @@ int btrfs_relocate_block_group(struct btrfs_root *extent_root, u64 group_start) | |||
| 4110 | int rw = 0; | 4111 | int rw = 0; |
| 4111 | int err = 0; | 4112 | int err = 0; |
| 4112 | 4113 | ||
| 4113 | rc = alloc_reloc_control(); | 4114 | rc = alloc_reloc_control(fs_info); |
| 4114 | if (!rc) | 4115 | if (!rc) |
| 4115 | return -ENOMEM; | 4116 | return -ENOMEM; |
| 4116 | 4117 | ||
| @@ -4311,7 +4312,7 @@ int btrfs_recover_relocation(struct btrfs_root *root) | |||
| 4311 | if (list_empty(&reloc_roots)) | 4312 | if (list_empty(&reloc_roots)) |
| 4312 | goto out; | 4313 | goto out; |
| 4313 | 4314 | ||
| 4314 | rc = alloc_reloc_control(); | 4315 | rc = alloc_reloc_control(root->fs_info); |
| 4315 | if (!rc) { | 4316 | if (!rc) { |
| 4316 | err = -ENOMEM; | 4317 | err = -ENOMEM; |
| 4317 | goto out; | 4318 | goto out; |
