[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0201ff9b-357f-4391-ae83-5920f39d68c0@kernel.dk>
Date: Wed, 9 Aug 2023 09:11:07 -0600
From: Jens Axboe <axboe@...nel.dk>
To: Christian Brauner <brauner@...nel.org>
Cc: io-uring@...r.kernel.org, linux-kernel@...r.kernel.org,
arnd@...db.de
Subject: Re: [PATCH 5/5] io_uring: add IORING_OP_WAITID support
On 8/9/23 5:27 AM, Christian Brauner wrote:
>> +int io_waitid(struct io_kiocb *req, unsigned int issue_flags)
>> +{
>> + struct io_waitid *iw = io_kiocb_to_cmd(req, struct io_waitid);
>> + struct io_ring_ctx *ctx = req->ctx;
>> + struct io_waitid_async *iwa;
>> + unsigned int f_flags = 0;
>> + int ret;
>> +
>> + if (io_alloc_async_data(req))
>> + return -ENOMEM;
>> +
>> + iwa = req->async_data;
>> + iwa->req = req;
>> +
>> + ret = kernel_waitid_prepare(&iwa->wo, iw->which, iw->upid, &iw->info,
>> + iw->options, NULL, &f_flags);
>
> It seems you're not really using @f_flags at all so I'd just not bother
> exposing it in kernel_waitid_prepare(). I think the following (untested)
> will let you avoid all this:
That's a good idea, I'll update it to get rid of the f_flags. Thanks!
--
Jens Axboe
Powered by blists - more mailing lists