[PATCH] xfs: xfs_iozero can return positive errno

Brian Foster bfoster at redhat.com
Thu Apr 16 12:32:43 CDT 2015


On Thu, Apr 16, 2015 at 10:38:41PM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner at redhat.com>
> 
> It was missed when we converted everything in XFs to use negative error
> numbers, so fix it now. Bug introduced in 3.17 by commit 2451337 ("xfs: global
> error sign conversion"), and should go back to stable kernels.
> 
> Thanks to Brian Foster for noticing it.
> 
> cc: <stable at vger.kernel.org> # 3.17, 3.18, 3.19, 4.0
> Signed-off-by: Dave Chinner <dchinner at redhat.com>
> ---

Reviewed-by: Brian Foster <bfoster at redhat.com>

>  fs/xfs/xfs_file.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
> index ec0c9c2..8383df0 100644
> --- a/fs/xfs/xfs_file.c
> +++ b/fs/xfs/xfs_file.c
> @@ -125,7 +125,7 @@ xfs_iozero(
>  		status = 0;
>  	} while (count);
>  
> -	return (-status);
> +	return status;
>  }
>  
>  int
> -- 
> 2.0.0
> 
> _______________________________________________
> xfs mailing list
> xfs at oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs



More information about the xfs mailing list