From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH] aio: remove 'always false' check Date: Fri, 13 Jul 2012 09:35:31 +0800 Message-ID: <20120713013531.GA12818@yliu-dev.sh.intel.com> References: <1341998122-9521-1-git-send-email-yuanhan.liu@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: bcrl@kvack.org, viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org To: Jeff Moyer Return-path: Received: from mga02.intel.com ([134.134.136.20]:27848 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932353Ab2GMBfG (ORCPT ); Thu, 12 Jul 2012 21:35:06 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Hi Jeff, On Wed, Jul 11, 2012 at 10:17:26AM -0400, Jeff Moyer wrote: > Yuanhan Liu writes: > > > The only case that nr_pages will be < 0 is that nr_pages overflowed due > > to nr_events is too big. But it is exclued at ioctx_alloc(). > > Right, the number of events is limited to what will fit in 256MB, for > some odd reason. Maybe Ben can comment on that. > > > Thus, nr_pages will always > 0. So remove the dead 'if (nr_pages < 0)' > > code block. > > Sure, but I don't see any harm in keeping this check. We do add another > page to the size, That would change nothing :) > so retesting for overflow is good practice, and isn't > going to kill performance. > > So, I'm going to NAK this. I'm fine with this NAK. And, thanks for your comments.