From: Dave Chinner Date: Thu, 28 May 2015 21:40:32 +0000 (+1000) Subject: xfs: xfs_iozero can return positive errno X-Git-Tag: v3.18.15~102 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8658b4f190913b9df1a8d4531630ab38f863f027;p=thirdparty%2Fkernel%2Fstable.git xfs: xfs_iozero can return positive errno [ Upstream commit cddc116228cb9d51d3224d23ba3e61fbbc3ec3d2 ] 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: # 3.17, 3.18, 3.19, 4.0 Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Signed-off-by: Dave Chinner Signed-off-by: Sasha Levin --- diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index b28f0d680cb5a..ba8b158a618af 100644 --- a/fs/xfs/xfs_file.c +++ b/fs/xfs/xfs_file.c @@ -127,7 +127,7 @@ xfs_iozero( status = 0; } while (count); - return (-status); + return status; } /*