From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: Chris Mason <clm@fb.com>, Josef Bacik <josef@toxicpanda.com>,
David Sterba <dsterba@suse.com>, Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org,
"Gustavo A. R. Silva" <gustavo@embeddedor.com>
Subject: [PATCH] btrfs: qgroup: Fix inconsistent IS_ERR and PTR_ERR
Date: Wed, 30 Jan 2019 20:30:16 -0600 [thread overview]
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 <gustavo@embeddedor.com>
---
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,
&block->first_key);
if (IS_ERR(reloc_eb)) {
- ret = PTR_ERR(subv_eb);
+ ret = PTR_ERR(reloc_eb);
reloc_eb = NULL;
goto free_out;
}
--
2.20.1
next reply other threads:[~2019-01-31 2:30 UTC|newest]
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 ` [PATCH] btrfs: qgroup: Fix inconsistent IS_ERR and PTR_ERR David Sterba
2019-01-31 22:09 ` Gustavo A. R. Silva
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=20190131023016.GA3413@embeddedor \
--to=gustavo@embeddedor.com \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=josef@toxicpanda.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wqu@suse.com \
/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).