From: Qu Wenruo Date: Mon, 26 Oct 2015 06:11:19 +0000 (+0800) Subject: btrfs: qgroup: Fix a rebase bug which will cause qgroup double free X-Git-Tag: v4.14-rc1~4163^2~36 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=90ce321da8ce3d00e19586993887346286208386;p=platform%2Fkernel%2Flinux-rpi.git btrfs: qgroup: Fix a rebase bug which will cause qgroup double free 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 Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c index 31d1934..46476c2 100644 --- a/fs/btrfs/qgroup.c +++ b/fs/btrfs/qgroup.c @@ -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); }