linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "zhangyi (F)" <yi.zhang@huawei.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-aio <linux-aio@kvack.org>,
	Linux FS-devel Mailing List <linux-fsdevel@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Benjamin LaHaise <bcrl@kvack.org>,
	Al Viro <viro@zeniv.linux.org.uk>, Jeff Moyer <jmoyer@redhat.com>,
	Deepa Dinamani <deepa.kernel@gmail.com>,
	Kefeng Wang <wangkefeng.wang@huawei.com>
Subject: Re: [PATCH v2] aio: add timeout validity check for io_[p]getevents
Date: Tue, 30 Jul 2019 21:52:35 +0800	[thread overview]
Message-ID: <bad8e43e-1b8b-90dd-b16e-c8784cbcc8d5@huawei.com> (raw)
In-Reply-To: <CAK8P3a233_UbX4roe-1Zr7d+3tn9me6hnBoqXsZcLToE_s_dag@mail.gmail.com>

On 2019/7/30 15:11, Arnd Bergmann Wrote:
> On Tue, Jul 30, 2019 at 3:46 AM zhangyi (F) <yi.zhang@huawei.com> wrote:
> 
>>  {
>> -       ktime_t until = ts ? timespec64_to_ktime(*ts) : KTIME_MAX;
>> -       struct kioctx *ioctx = lookup_ioctx(ctx_id);
>> +       ktime_t until = KTIME_MAX;
>> +       struct kioctx *ioctx = NULL;
>>         long ret = -EINVAL;
>>
>> +       if (ts) {
>> +               if (!timespec64_valid(ts))
>> +                       return ret;
>> +               until = timespec64_to_ktime(*ts);
>> +       }
> 
> The man page should probably get updated as well to reflect that this
> will now return -EINVAL for a negative timeout or malformed
> nanoseconds.
> 

Thanks for your suggestion, I will add a patch to update the man page.

Thanks,
Yi.


      reply	other threads:[~2019-07-30 13:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-30  1:51 [PATCH v2] aio: add timeout validity check for io_[p]getevents zhangyi (F)
2019-07-30  7:11 ` Arnd Bergmann
2019-07-30 13:52   ` zhangyi (F) [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bad8e43e-1b8b-90dd-b16e-c8784cbcc8d5@huawei.com \
    --to=yi.zhang@huawei.com \
    --cc=arnd@arndb.de \
    --cc=bcrl@kvack.org \
    --cc=deepa.kernel@gmail.com \
    --cc=jmoyer@redhat.com \
    --cc=linux-aio@kvack.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=wangkefeng.wang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).