Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1426636
| From | Minfei Huang <mnghuan@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] aio: Cleanup unnecessary test for nr_pages |
| Date | 2016-06-20 16:10 +0200 |
| Message-ID | <rM83L-OW-5@gated-at.bofh.it> (permalink) |
| References | <rJgAx-2ym-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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)
>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] aio: Cleanup unnecessary test for nr_pages Minfei Huang <mnghuan@gmail.com> - 2016-06-12 18:40 +0200
Re: [PATCH] aio: Cleanup unnecessary test for nr_pages Minfei Huang <mnghuan@gmail.com> - 2016-06-20 16:10 +0200
Re: [PATCH] aio: Cleanup unnecessary test for nr_pages Al Viro <viro@ZenIV.linux.org.uk> - 2016-06-20 16:30 +0200
Re: [PATCH] aio: Cleanup unnecessary test for nr_pages Minfei Huang <mnghuan@gmail.com> - 2016-06-22 08:10 +0200
csiph-web