2020-03-04 02:18:22

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build warning after merge of the block tree

Hi all,

After merging the block tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:

fs/io_uring.c: In function 'io_close':
fs/io_uring.c:3415:3: warning: ignoring return value of 'refcount_inc_not_zero', declared with attribute warn_unused_result [-Wunused-result]
3415 | refcount_inc_not_zero(&req->refs);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Introduced by commit

62e0c6b73a2c ("io_uring: make submission ref putting consistent")

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2020-03-04 03:02:19

by Jens Axboe

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the block tree

On 3/3/20 7:17 PM, Stephen Rothwell wrote:
> Hi all,
>
> After merging the block tree, today's linux-next build (powerpc
> ppc64_defconfig) produced this warning:
>
> fs/io_uring.c: In function 'io_close':
> fs/io_uring.c:3415:3: warning: ignoring return value of 'refcount_inc_not_zero', declared with attribute warn_unused_result [-Wunused-result]
> 3415 | refcount_inc_not_zero(&req->refs);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Introduced by commit
>
> 62e0c6b73a2c ("io_uring: make submission ref putting consistent")

That should just be a refcount_inc() and also looks like it should happen
before the async queue. I'll fix it up.

--
Jens Axboe

2020-03-04 12:53:17

by Pavel Begunkov

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the block tree

On 04/03/2020 06:01, Jens Axboe wrote:
> On 3/3/20 7:17 PM, Stephen Rothwell wrote:
>> Hi all,
>>
>> After merging the block tree, today's linux-next build (powerpc
>> ppc64_defconfig) produced this warning:
>>
>> fs/io_uring.c: In function 'io_close':
>> fs/io_uring.c:3415:3: warning: ignoring return value of 'refcount_inc_not_zero', declared with attribute warn_unused_result [-Wunused-result]
>> 3415 | refcount_inc_not_zero(&req->refs);
>> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>> Introduced by commit
>>
>> 62e0c6b73a2c ("io_uring: make submission ref putting consistent")
>
> That should just be a refcount_inc() and also looks like it should happen
> before the async queue. I'll fix it up.

Yes, it's better to. Thanks!


--
Pavel Begunkov