Re: [PATCH 5/5] io_uring: add IORING_OP_WAITID support

From: Jens Axboe
Date: Wed Aug 09 2023 - 11:11:14 EST


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