From 1f2ace68e624c61e99ce6c85898003628fa480a7 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Thu, 3 Sep 2015 08:41:48 +1000 Subject: [PATCH] libxfs: fix XFS_WANT_CORRUPTED_* macros to return negative error codes Since the rest of libxfs returns negative error codes, these two sanity checking macros ought to have the same applied. While we're at it, fix a couple more sign errors in the same file. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner --- libxfs/libxfs_priv.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libxfs/libxfs_priv.h b/libxfs/libxfs_priv.h index 2a8b85073..22f2d538b 100644 --- a/libxfs/libxfs_priv.h +++ b/libxfs/libxfs_priv.h @@ -148,9 +148,9 @@ enum ce { CE_DEBUG, CE_CONT, CE_NOTE, CE_WARN, CE_ALERT, CE_PANIC }; #define XFS_TRANS_UNRESERVE_QUOTA_NBLKS(mp,tp,ip,nblks,ninos,fl) 0 #define XFS_TEST_ERROR(expr,a,b,c) ( expr ) #define XFS_WANT_CORRUPTED_GOTO(mp, expr, l) \ - { (mp) = (mp); if (!(expr)) { error = EFSCORRUPTED; goto l; } } + { (mp) = (mp); if (!(expr)) { error = -EFSCORRUPTED; goto l; } } #define XFS_WANT_CORRUPTED_RETURN(mp, expr) \ - { (mp) = (mp); if (!(expr)) { return EFSCORRUPTED; } } + { (mp) = (mp); if (!(expr)) { return -EFSCORRUPTED; } } #ifdef __GNUC__ #define __return_address __builtin_return_address(0) @@ -417,8 +417,7 @@ do { \ }) #define xfs_rotorstep 1 -#define xfs_bmap_rtalloc(a) (ENOSYS) -#define xfs_rtpick_extent(mp,tp,len,p) (ENOSYS) +#define xfs_bmap_rtalloc(a) (-ENOSYS) #define xfs_get_extsz_hint(ip) (0) #define xfs_inode_is_filestream(ip) (0) #define xfs_filestream_lookup_ag(ip) (0) -- 2.47.2