All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Moyer <jmoyer@redhat.com>
To: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Cc: bcrl@kvack.org, viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] aio: remove 'always false' check
Date: Wed, 11 Jul 2012 10:17:26 -0400	[thread overview]
Message-ID: <x49txxeidqh.fsf@segfault.boston.devel.redhat.com> (raw)
In-Reply-To: <1341998122-9521-1-git-send-email-yuanhan.liu@linux.intel.com> (Yuanhan Liu's message of "Wed, 11 Jul 2012 17:15:22 +0800")

Yuanhan Liu <yuanhan.liu@linux.intel.com> 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, so retesting for overflow is good practice, and isn't
going to kill performance.

So, I'm going to NAK this.

Cheers,
Jeff

  reply	other threads:[~2012-07-11 14:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-11  9:15 [PATCH] aio: remove 'always false' check Yuanhan Liu
2012-07-11 14:17 ` Jeff Moyer [this message]
2012-07-13  1:35   ` Yuanhan Liu

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=x49txxeidqh.fsf@segfault.boston.devel.redhat.com \
    --to=jmoyer@redhat.com \
    --cc=bcrl@kvack.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=yuanhan.liu@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.