linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Minfei Huang <mnghuan@gmail.com>
To: viro@zeniv.linux.org.uk, bcrl@kvack.org
Cc: linux-fsdevel@vger.kernel.org, linux-aio@kvack.org,
	linux-kernel@vger.kernel.org, minfei.hmf@alibaba-inc.com
Subject: Re: [PATCH] aio: Cleanup unnecessary test for nr_pages
Date: Mon, 20 Jun 2016 22:05:45 +0800	[thread overview]
Message-ID: <20160620140545.GA87874@MinfeideMacBook-Pro.local> (raw)
In-Reply-To: <1465749234-25746-1-git-send-email-mnghuan@gmail.com>

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.
> 
> Signed-off-by: Minfei Huang <mnghuan@gmail.com>
> ---
>  fs/aio.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/fs/aio.c b/fs/aio.c
> index fb8e45b..ec05137 100644
> --- a/fs/aio.c
> +++ b/fs/aio.c
> @@ -450,8 +450,6 @@ static int aio_setup_ring(struct kioctx *ctx)
>  	size += sizeof(struct io_event) * nr_events;
>  
>  	nr_pages = PFN_UP(size);
> -	if (nr_pages < 0)
> -		return -EINVAL;
>  
>  	file = aio_private_file(ctx, nr_pages);
>  	if (IS_ERR(file)) {
> -- 
> 2.7.4 (Apple Git-66)
> 

  reply	other threads:[~2016-06-20 14:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-12 16:33 [PATCH] aio: Cleanup unnecessary test for nr_pages Minfei Huang
2016-06-20 14:05 ` Minfei Huang [this message]
2016-06-20 14:17   ` Al Viro
2016-06-22  6:06     ` Minfei Huang

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=20160620140545.GA87874@MinfeideMacBook-Pro.local \
    --to=mnghuan@gmail.com \
    --cc=bcrl@kvack.org \
    --cc=linux-aio@kvack.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minfei.hmf@alibaba-inc.com \
    --cc=viro@zeniv.linux.org.uk \
    /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).