aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/btrfs/qgroup.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c
index c1cd5558a646..eb680b715dd6 100644
--- a/fs/btrfs/qgroup.c
+++ b/fs/btrfs/qgroup.c
@@ -894,6 +894,12 @@ int btrfs_quota_enable(struct btrfs_fs_info *fs_info)
894 if (fs_info->quota_root) 894 if (fs_info->quota_root)
895 goto out; 895 goto out;
896 896
897 fs_info->qgroup_ulist = ulist_alloc(GFP_KERNEL);
898 if (!fs_info->qgroup_ulist) {
899 ret = -ENOMEM;
900 goto out;
901 }
902
897 /* 903 /*
898 * 1 for quota root item 904 * 1 for quota root item
899 * 1 for BTRFS_QGROUP_STATUS item 905 * 1 for BTRFS_QGROUP_STATUS item
@@ -909,13 +915,6 @@ int btrfs_quota_enable(struct btrfs_fs_info *fs_info)
909 goto out; 915 goto out;
910 } 916 }
911 917
912 fs_info->qgroup_ulist = ulist_alloc(GFP_KERNEL);
913 if (!fs_info->qgroup_ulist) {
914 ret = -ENOMEM;
915 btrfs_abort_transaction(trans, ret);
916 goto out;
917 }
918
919 /* 918 /*
920 * initially create the quota tree 919 * initially create the quota tree
921 */ 920 */