Skip to content

Commit

Permalink
Revert "Btrfs: fix some error codes in btrfs_qgroup_inherit()"
Browse files Browse the repository at this point in the history
This reverts commit 5986802.

Both paths are not error paths but regular cases where non-qgroup
subvols are involved.

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
  • Loading branch information
Chris Mason committed Sep 15, 2012
1 parent 256dd1b commit f3a87f1
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions fs/btrfs/qgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1371,10 +1371,8 @@ int btrfs_qgroup_inherit(struct btrfs_trans_handle *trans,

if (srcid) {
srcgroup = find_qgroup_rb(fs_info, srcid);
if (!srcgroup) {
ret = -EINVAL;
if (!srcgroup)
goto unlock;
}
dstgroup->rfer = srcgroup->rfer - level_size;
dstgroup->rfer_cmpr = srcgroup->rfer_cmpr - level_size;
srcgroup->excl = level_size;
Expand All @@ -1383,10 +1381,8 @@ int btrfs_qgroup_inherit(struct btrfs_trans_handle *trans,
qgroup_dirty(fs_info, srcgroup);
}

if (!inherit) {
ret = -EINVAL;
if (!inherit)
goto unlock;
}

i_qgroups = (u64 *)(inherit + 1);
for (i = 0; i < inherit->num_qgroups; ++i) {
Expand Down

0 comments on commit f3a87f1

Please sign in to comment.