linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 3/3] btrfs: qgroup: Fix a rebase bug which will cause qgroup double free
Date: Mon, 26 Oct 2015 14:11:19 +0800	[thread overview]
Message-ID: <1445839879-17716-4-git-send-email-quwenruo@cn.fujitsu.com> (raw)
In-Reply-To: <1445839879-17716-1-git-send-email-quwenruo@cn.fujitsu.com>

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>
---
 fs/btrfs/qgroup.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c
index 158633c..7664a63 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);
 	}
-- 
2.6.2


  parent reply	other threads:[~2015-10-26  6:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-26  6:11 [4.4][PATCH 0/3] btrfs: Qgroup hotfix Qu Wenruo
2015-10-26  6:11 ` [PATCH 1/3] btrfs: Cleanup no_quota parameter Qu Wenruo
2015-10-26  8:14   ` Filipe Manana
2015-10-26  8:25     ` Qu Wenruo
2015-10-26  8:27       ` Qu Wenruo
2015-10-26  8:28       ` Filipe Manana
2015-10-26  6:11 ` [PATCH 2/3] btrfs: qgroup: Fix a race in delayed_ref which leads to abort trans Qu Wenruo
2015-10-26  6:11 ` Qu Wenruo [this message]
2015-10-29 11:09   ` [3/3] btrfs: qgroup: Fix a rebase bug which will cause qgroup double free Johannes Henninger
2015-10-30 10:23     ` Johannes Henninger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1445839879-17716-4-git-send-email-quwenruo@cn.fujitsu.com \
    --to=quwenruo@cn.fujitsu.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).