* [PATCH] io_uring: remove redundant variable pointer nxt and io_wq_assign_next call
@ 2020-04-06 22:54 Colin King
2020-04-06 22:59 ` Chaitanya Kulkarni
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Colin King @ 2020-04-06 22:54 UTC (permalink / raw)
To: Alexander Viro, Jens Axboe, linux-fsdevel, io-uring
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <[email protected]>
An earlier commit "io_uring: remove @nxt from handlers" removed the
setting of pointer nxt and now it is always null, hence the non-null
check and call to io_wq_assign_next is redundant and can be removed.
Addresses-Coverity: ("'Constant' variable guard")
Signed-off-by: Colin Ian King <[email protected]>
---
fs/io_uring.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 14efcf0a3070..b594fa0bd210 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -3509,14 +3509,11 @@ static void __io_sync_file_range(struct io_kiocb *req)
static void io_sync_file_range_finish(struct io_wq_work **workptr)
{
struct io_kiocb *req = container_of(*workptr, struct io_kiocb, work);
- struct io_kiocb *nxt = NULL;
if (io_req_cancelled(req))
return;
__io_sync_file_range(req);
io_put_req(req); /* put submission ref */
- if (nxt)
- io_wq_assign_next(workptr, nxt);
}
static int io_sync_file_range(struct io_kiocb *req, bool force_nonblock)
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] io_uring: remove redundant variable pointer nxt and io_wq_assign_next call
2020-04-06 22:54 [PATCH] io_uring: remove redundant variable pointer nxt and io_wq_assign_next call Colin King
@ 2020-04-06 22:59 ` Chaitanya Kulkarni
2020-04-06 23:33 ` Jens Axboe
2020-04-07 6:12 ` Pavel Begunkov
2 siblings, 0 replies; 4+ messages in thread
From: Chaitanya Kulkarni @ 2020-04-06 22:59 UTC (permalink / raw)
To: Colin King, Alexander Viro, Jens Axboe,
[email protected], [email protected]
Cc: [email protected], [email protected]
On 04/06/2020 03:54 PM, Colin King wrote:
> From: Colin Ian King<[email protected]>
>
> An earlier commit "io_uring: remove @nxt from handlers" removed the
> setting of pointer nxt and now it is always null, hence the non-null
> check and call to io_wq_assign_next is redundant and can be removed.
>
> Addresses-Coverity: ("'Constant' variable guard")
> Signed-off-by: Colin Ian King<[email protected]>
Looks good.
Reviewed-by: Chaitanya Kulkarni <[email protected]>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] io_uring: remove redundant variable pointer nxt and io_wq_assign_next call
2020-04-06 22:54 [PATCH] io_uring: remove redundant variable pointer nxt and io_wq_assign_next call Colin King
2020-04-06 22:59 ` Chaitanya Kulkarni
@ 2020-04-06 23:33 ` Jens Axboe
2020-04-07 6:12 ` Pavel Begunkov
2 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2020-04-06 23:33 UTC (permalink / raw)
To: Colin King, Alexander Viro, linux-fsdevel, io-uring
Cc: kernel-janitors, linux-kernel
On 4/6/20 3:54 PM, Colin King wrote:
> From: Colin Ian King <[email protected]>
>
> An earlier commit "io_uring: remove @nxt from handlers" removed the
> setting of pointer nxt and now it is always null, hence the non-null
> check and call to io_wq_assign_next is redundant and can be removed.
Thanks, applied.
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] io_uring: remove redundant variable pointer nxt and io_wq_assign_next call
2020-04-06 22:54 [PATCH] io_uring: remove redundant variable pointer nxt and io_wq_assign_next call Colin King
2020-04-06 22:59 ` Chaitanya Kulkarni
2020-04-06 23:33 ` Jens Axboe
@ 2020-04-07 6:12 ` Pavel Begunkov
2 siblings, 0 replies; 4+ messages in thread
From: Pavel Begunkov @ 2020-04-07 6:12 UTC (permalink / raw)
To: Colin King, Alexander Viro, Jens Axboe, linux-fsdevel, io-uring
Cc: kernel-janitors, linux-kernel
On 07/04/2020 01:54, Colin King wrote:
> From: Colin Ian King <[email protected]>
>
> An earlier commit "io_uring: remove @nxt from handlers" removed the
> setting of pointer nxt and now it is always null, hence the non-null
> check and call to io_wq_assign_next is redundant and can be removed.
>
> Addresses-Coverity: ("'Constant' variable guard")
> Signed-off-by: Colin Ian King <[email protected]>
> ---
> fs/io_uring.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/fs/io_uring.c b/fs/io_uring.c
> index 14efcf0a3070..b594fa0bd210 100644
> --- a/fs/io_uring.c
> +++ b/fs/io_uring.c
> @@ -3509,14 +3509,11 @@ static void __io_sync_file_range(struct io_kiocb *req)
> static void io_sync_file_range_finish(struct io_wq_work **workptr)
> {
> struct io_kiocb *req = container_of(*workptr, struct io_kiocb, work);
> - struct io_kiocb *nxt = NULL;
>
> if (io_req_cancelled(req))
> return;
> __io_sync_file_range(req);
> io_put_req(req); /* put submission ref */
> - if (nxt)
> - io_wq_assign_next(workptr, nxt);
Works, but it should be io_steal_work() instead
--
Pavel Begunkov
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-04-07 6:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-06 22:54 [PATCH] io_uring: remove redundant variable pointer nxt and io_wq_assign_next call Colin King
2020-04-06 22:59 ` Chaitanya Kulkarni
2020-04-06 23:33 ` Jens Axboe
2020-04-07 6:12 ` Pavel Begunkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox