xfs: xfs_iozero can return positive errno
authorDave Chinner <dchinner@redhat.com>
Thu, 28 May 2015 21:40:32 +0000 (07:40 +1000)
committerSasha Levin <sasha.levin@oracle.com>
Tue, 9 Jun 2015 17:43:53 +0000 (13:43 -0400)
[ 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: <stable@vger.kernel.org> # 3.17, 3.18, 3.19, 4.0
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
fs/xfs/xfs_file.c

index b28f0d680cb5ae548eef6f92da95c697261264a5..ba8b158a618afa5b0075778e8036b2a6827fe02f 100644 (file)
@@ -127,7 +127,7 @@ xfs_iozero(
                status = 0;
        } while (count);
 
-       return (-status);
+       return status;
 }
 
 /*