diff options
| -rw-r--r-- | fs/btrfs/relocation.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 0a3f02562053..429c73c374b8 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c | |||
| @@ -2409,6 +2409,13 @@ out: | |||
| 2409 | btrfs_std_error(root->fs_info, ret); | 2409 | btrfs_std_error(root->fs_info, ret); |
| 2410 | if (!list_empty(&reloc_roots)) | 2410 | if (!list_empty(&reloc_roots)) |
| 2411 | free_reloc_roots(&reloc_roots); | 2411 | free_reloc_roots(&reloc_roots); |
| 2412 | |||
| 2413 | /* new reloc root may be added */ | ||
| 2414 | mutex_lock(&root->fs_info->reloc_mutex); | ||
| 2415 | list_splice_init(&rc->reloc_roots, &reloc_roots); | ||
| 2416 | mutex_unlock(&root->fs_info->reloc_mutex); | ||
| 2417 | if (!list_empty(&reloc_roots)) | ||
| 2418 | free_reloc_roots(&reloc_roots); | ||
| 2412 | } | 2419 | } |
| 2413 | 2420 | ||
| 2414 | BUG_ON(!RB_EMPTY_ROOT(&rc->reloc_root_tree.rb_root)); | 2421 | BUG_ON(!RB_EMPTY_ROOT(&rc->reloc_root_tree.rb_root)); |
