diff options
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/disk-io.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 60ce1190307b..6c88c63f3be7 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -1600,14 +1600,14 @@ int btrfs_init_fs_root(struct btrfs_root *root) | |||
1600 | 1600 | ||
1601 | ret = get_anon_bdev(&root->anon_dev); | 1601 | ret = get_anon_bdev(&root->anon_dev); |
1602 | if (ret) | 1602 | if (ret) |
1603 | goto free_writers; | 1603 | goto fail; |
1604 | 1604 | ||
1605 | mutex_lock(&root->objectid_mutex); | 1605 | mutex_lock(&root->objectid_mutex); |
1606 | ret = btrfs_find_highest_objectid(root, | 1606 | ret = btrfs_find_highest_objectid(root, |
1607 | &root->highest_objectid); | 1607 | &root->highest_objectid); |
1608 | if (ret) { | 1608 | if (ret) { |
1609 | mutex_unlock(&root->objectid_mutex); | 1609 | mutex_unlock(&root->objectid_mutex); |
1610 | goto free_root_dev; | 1610 | goto fail; |
1611 | } | 1611 | } |
1612 | 1612 | ||
1613 | ASSERT(root->highest_objectid <= BTRFS_LAST_FREE_OBJECTID); | 1613 | ASSERT(root->highest_objectid <= BTRFS_LAST_FREE_OBJECTID); |
@@ -1615,14 +1615,8 @@ int btrfs_init_fs_root(struct btrfs_root *root) | |||
1615 | mutex_unlock(&root->objectid_mutex); | 1615 | mutex_unlock(&root->objectid_mutex); |
1616 | 1616 | ||
1617 | return 0; | 1617 | return 0; |
1618 | |||
1619 | free_root_dev: | ||
1620 | free_anon_bdev(root->anon_dev); | ||
1621 | free_writers: | ||
1622 | btrfs_free_subvolume_writers(root->subv_writers); | ||
1623 | fail: | 1618 | fail: |
1624 | kfree(root->free_ino_ctl); | 1619 | /* the caller is responsible to call free_fs_root */ |
1625 | kfree(root->free_ino_pinned); | ||
1626 | return ret; | 1620 | return ret; |
1627 | } | 1621 | } |
1628 | 1622 | ||