[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160620141739.GK14480@ZenIV.linux.org.uk>
Date: Mon, 20 Jun 2016 15:17:39 +0100
From: Al Viro <viro@...IV.linux.org.uk>
To: Minfei Huang <mnghuan@...il.com>
Cc: bcrl@...ck.org, linux-fsdevel@...r.kernel.org, linux-aio@...ck.org,
linux-kernel@...r.kernel.org, minfei.hmf@...baba-inc.com
Subject: Re: [PATCH] aio: Cleanup unnecessary test for nr_pages
On Mon, Jun 20, 2016 at 10:05:45PM +0800, Minfei Huang wrote:
> Ping. Any comment is appreciate.
>
> Thanks
> Minfei
>
> On 06/13/16 at 12:33P, Minfei Huang wrote:
> > The variable nr_pages is always more than 1, because the size of
> > structure aio_ring is bigger than 0. So remove unnecessary test for
> > nr_page.
What this test really checks is that the value we'd put into nr_pages
(PFN_UP(size)) is not greater than 2^31. Whether it's redundant or not
is a separate question - it very well might be, due to the code in
ioctx_alloc() that caps nr_events, but that needs a proof. In any case,
the reasons you are offering in commit message are wrong - it's about
size being too _large_, not too small.
Powered by blists - more mailing lists