* [PATCH] btrfs: qgroup: Fix inconsistent IS_ERR and PTR_ERR
@ 2019-01-31 2:30 Gustavo A. R. Silva
2019-01-31 11:49 ` David Sterba
0 siblings, 1 reply; 3+ messages in thread
From: Gustavo A. R. Silva @ 2019-01-31 2:30 UTC (permalink / raw)
To: Chris Mason, Josef Bacik, David Sterba, Qu Wenruo
Cc: linux-btrfs, linux-kernel, Gustavo A. R. Silva
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] btrfs: qgroup: Fix inconsistent IS_ERR and PTR_ERR
2019-01-31 2:30 [PATCH] btrfs: qgroup: Fix inconsistent IS_ERR and PTR_ERR Gustavo A. R. Silva
@ 2019-01-31 11:49 ` David Sterba
2019-01-31 22:09 ` Gustavo A. R. Silva
0 siblings, 1 reply; 3+ messages in thread
From: David Sterba @ 2019-01-31 11:49 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: Chris Mason, Josef Bacik, David Sterba, Qu Wenruo, linux-btrfs,
linux-kernel
On Wed, Jan 30, 2019 at 08:30:16PM -0600, Gustavo A. R. Silva wrote:
> 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);
Thanks, this was reported and fixed but the change has not propagated to
for-next yet.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] btrfs: qgroup: Fix inconsistent IS_ERR and PTR_ERR
2019-01-31 11:49 ` David Sterba
@ 2019-01-31 22:09 ` Gustavo A. R. Silva
0 siblings, 0 replies; 3+ messages in thread
From: Gustavo A. R. Silva @ 2019-01-31 22:09 UTC (permalink / raw)
To: dsterba, Chris Mason, Josef Bacik, David Sterba, Qu Wenruo,
linux-btrfs, linux-kernel
On 1/31/19 5:49 AM, David Sterba wrote:
> On Wed, Jan 30, 2019 at 08:30:16PM -0600, Gustavo A. R. Silva wrote:
>> 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);
>
> Thanks, this was reported and fixed but the change has not propagated to
> for-next yet.
>
Great. Good to know it is fixed now.
Thanks
--
Gustavo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-01-31 22:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-31 2:30 [PATCH] btrfs: qgroup: Fix inconsistent IS_ERR and PTR_ERR Gustavo A. R. Silva
2019-01-31 11:49 ` David Sterba
2019-01-31 22:09 ` Gustavo A. R. Silva
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).