Re: [PATCH] mm/readahead.c: need always return 0 when system call readahead() succeeds

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

 



On Tue, 15 Oct 2013, Chen Gang wrote:

> diff --git a/mm/readahead.c b/mm/readahead.c
> index 1eee42b..83a202e 100644
> --- a/mm/readahead.c
> +++ b/mm/readahead.c
> @@ -592,5 +592,5 @@ SYSCALL_DEFINE3(readahead, int, fd, loff_t, offset, size_t, count)
>  		}
>  		fdput(f);
>  	}
> -	return ret;
> +	return ret < 0 ? ret : 0;
>  }

This was broken by your own "mm/readahead.c: return the value which 
force_page_cache_readahead() returns" patch in -mm, luckily Linus's tree 
isn't affected.

Nack to this and nack to the problem patch, which is absolutely pointless 
and did nothing but introduce this error.  readahead() is supposed to 
return 0, -EINVAL, or -EBADF and your original patch broke it.  That's 
because your original patch was completely pointless to begin with.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]