* [PATCH -next] btrfs: qgroup: Fix inconsistent IS_ERR and PTR_ERR
@ 2019-01-25 1:50 YueHaibing
2019-01-25 1:59 ` Qu Wenruo
0 siblings, 1 reply; 3+ messages in thread
From: YueHaibing @ 2019-01-25 1:50 UTC (permalink / raw)
To: Chris Mason, Josef Bacik, David Sterba, Qu Wenruo
Cc: YueHaibing, linux-btrfs, kernel-janitors
Change the call to PTR_ERR to access the value just tested by IS_ERR.
Fixes: 2b35a512e9cf ("btrfs: qgroup: Use delayed subtree rescan for balance")
Signed-off-by: YueHaibing <yuehaibing@huawei.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 8559ed9..16d7ec8 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;
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] btrfs: qgroup: Fix inconsistent IS_ERR and PTR_ERR
2019-01-25 1:50 [PATCH -next] btrfs: qgroup: Fix inconsistent IS_ERR and PTR_ERR YueHaibing
@ 2019-01-25 1:59 ` Qu Wenruo
2019-01-26 1:37 ` YueHaibing
0 siblings, 1 reply; 3+ messages in thread
From: Qu Wenruo @ 2019-01-25 1:59 UTC (permalink / raw)
To: YueHaibing, Chris Mason, Josef Bacik, David Sterba, Qu Wenruo
Cc: linux-btrfs, kernel-janitors
[-- Attachment #1.1: Type: text/plain, Size: 925 bytes --]
On 2019/1/25 上午9:50, YueHaibing wrote:
> Change the call to PTR_ERR to access the value just tested by IS_ERR.
>
> Fixes: 2b35a512e9cf ("btrfs: qgroup: Use delayed subtree rescan for balance")
> Signed-off-by: YueHaibing <yuehaibing@huawei.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 8559ed9..16d7ec8 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);
Nice catch.
I'll fold the this fix in my original patch if it's OK for you.
Thanks,
Qu
> reloc_eb = NULL;
> goto free_out;
> }
>
>
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] btrfs: qgroup: Fix inconsistent IS_ERR and PTR_ERR
2019-01-25 1:59 ` Qu Wenruo
@ 2019-01-26 1:37 ` YueHaibing
0 siblings, 0 replies; 3+ messages in thread
From: YueHaibing @ 2019-01-26 1:37 UTC (permalink / raw)
To: Qu Wenruo, Chris Mason, Josef Bacik, David Sterba, Qu Wenruo
Cc: linux-btrfs, kernel-janitors
On 2019/1/25 9:59, Qu Wenruo wrote:
>
>
> On 2019/1/25 上午9:50, YueHaibing wrote:
>> Change the call to PTR_ERR to access the value just tested by IS_ERR.
>>
>> Fixes: 2b35a512e9cf ("btrfs: qgroup: Use delayed subtree rescan for balance")
>> Signed-off-by: YueHaibing <yuehaibing@huawei.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 8559ed9..16d7ec8 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);
>
> Nice catch.
>
> I'll fold the this fix in my original patch if it's OK for you.
Ok, sure.
>
> Thanks,
> Qu
>
>> reloc_eb = NULL;
>> goto free_out;
>> }
>>
>>
>>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-01-26 1:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-25 1:50 [PATCH -next] btrfs: qgroup: Fix inconsistent IS_ERR and PTR_ERR YueHaibing
2019-01-25 1:59 ` Qu Wenruo
2019-01-26 1:37 ` YueHaibing
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).