xfs: Fix error return for fallocate() on XFS
authorJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Tue, 24 Nov 2009 21:52:53 +0000 (21:52 +0000)
committerAlex Elder <aelder@sgi.com>
Fri, 11 Dec 2009 21:11:23 +0000 (15:11 -0600)
commit44a743f68705c681439f264deb05f8f38e9048d3
tree3634e5e6599143f44e37e0964f61688ecf7af4a4
parent30ac0683dd452ba273c8db92a74d8cf7aef981d8
xfs: Fix error return for fallocate() on XFS

Noticed that through glibc fallocate would return 28 rather than -1
and errno = 28 for ENOSPC. The xfs routines uses XFS_ERROR format
positive return error codes while the syscalls use negative return
codes.  Fixup the two cases in xfs_vn_fallocate syscall to convert to
negative.

Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Alex Elder <aelder@sgi.com>
fs/xfs/linux-2.6/xfs_iops.c