Linux-BTRFS Archive on
 help / color / Atom feed
From: "Gustavo A. R. Silva" <>
To: Chris Mason <>, Josef Bacik <>,
	David Sterba <>, Qu Wenruo <>
	"Gustavo A. R. Silva" <>
Subject: [PATCH] btrfs: qgroup: Fix inconsistent IS_ERR and PTR_ERR
Date: Wed, 30 Jan 2019 20:30:16 -0600
Message-ID: <20190131023016.GA3413@embeddedor> (raw)

Fix inconsistent IS_ERR and PTR_ERR in btrfs_qgroup_trace_subtree_after_cow

The proper pointer to be passed as argument is reloc_eb.

This bug was detected with the help of Coccinelle.

Fixes: 2b35a512e9cf ("btrfs: qgroup: Use delayed subtree rescan for balance")
Signed-off-by: Gustavo A. R. Silva <>
 fs/btrfs/qgroup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c
index 8559ed92d708..16d7ec8e4a06 100644
--- a/fs/btrfs/qgroup.c
+++ b/fs/btrfs/qgroup.c
@@ -3931,7 +3931,7 @@ int btrfs_qgroup_trace_subtree_after_cow(struct btrfs_trans_handle *trans,
 				   block->reloc_generation, block->level,
 	if (IS_ERR(reloc_eb)) {
-		ret = PTR_ERR(subv_eb);
+		ret = PTR_ERR(reloc_eb);
 		reloc_eb = NULL;
 		goto free_out;

             reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-31  2:30 Gustavo A. R. Silva [this message]
2019-01-31 11:49 ` David Sterba
2019-01-31 22:09   ` Gustavo A. R. Silva

Reply instructions:

You may reply publically 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:

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

  git send-email \
    --in-reply-to=20190131023016.GA3413@embeddedor \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-BTRFS Archive on

Archives are clonable:
	git clone --mirror linux-btrfs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-btrfs linux-btrfs/ \
	public-inbox-index linux-btrfs

Newsgroup available over NNTP:

AGPL code for this site: git clone public-inbox