Re: [PATCH] aio: Cleanup unnecessary test for nr_pages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> ---
>  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)
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux