Skip to content

Commit

Permalink
btrfs: qgroup: Fix a rebase bug which will cause qgroup double free
Browse files Browse the repository at this point in the history
When rebasing my patchset, I forgot to pick up a cleanup patch to remove
old hotfix in 4.2 release.

Witouth the cleanup, it will screw up new qgroup reserve framework and
always cause minus reserved number.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
  • Loading branch information
Qu Wenruo authored and Chris Mason committed Oct 27, 2015
1 parent 5846a3c commit 90ce321
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions fs/btrfs/qgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1652,10 +1652,6 @@ static int qgroup_update_counters(struct btrfs_fs_info *fs_info,
}
}

/* For exclusive extent, free its reserved bytes too */
if (nr_old_roots == 0 && nr_new_roots == 1 &&
cur_new_count == nr_new_roots)
qg->reserved -= num_bytes;
if (dirty)
qgroup_dirty(fs_info, qg);
}
Expand Down

0 comments on commit 90ce321

Please sign in to comment.