aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_trans.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2014-06-25 00:58:08 -0400
committerDave Chinner <david@fromorbit.com>2014-06-25 00:58:08 -0400
commit2451337dd043901b5270b7586942abe564443e3d (patch)
tree5f2a59b2c829dbb942c18315ffc0edfed0d3790a /fs/xfs/xfs_trans.c
parent30f712c9dd69348aa51351d5cb6d366bf4fae31d (diff)
xfs: global error sign conversion
Convert all the errors the core XFs code to negative error signs like the rest of the kernel and remove all the sign conversion we do in the interface layers. Errors for conversion (and comparison) found via searches like: $ git grep " E" fs/xfs $ git grep "return E" fs/xfs $ git grep " E[A-Z].*;$" fs/xfs Negation points found via searches like: $ git grep "= -[a-z,A-Z]" fs/xfs $ git grep "return -[a-z,A-D,F-Z]" fs/xfs $ git grep " -[a-z].*;" fs/xfs [ with some bits I missed from Brian Foster ] Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_trans.c')
-rw-r--r--fs/xfs/xfs_trans.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c
index 6b9b48dfddaa..30e8e3410955 100644
--- a/fs/xfs/xfs_trans.c
+++ b/fs/xfs/xfs_trans.c
@@ -190,7 +190,7 @@ xfs_trans_reserve(
190 -((int64_t)blocks), rsvd); 190 -((int64_t)blocks), rsvd);
191 if (error != 0) { 191 if (error != 0) {
192 current_restore_flags_nested(&tp->t_pflags, PF_FSTRANS); 192 current_restore_flags_nested(&tp->t_pflags, PF_FSTRANS);
193 return ENOSPC; 193 return -ENOSPC;
194 } 194 }
195 tp->t_blk_res += blocks; 195 tp->t_blk_res += blocks;
196 } 196 }
@@ -241,7 +241,7 @@ xfs_trans_reserve(
241 error = xfs_mod_incore_sb(tp->t_mountp, XFS_SBS_FREXTENTS, 241 error = xfs_mod_incore_sb(tp->t_mountp, XFS_SBS_FREXTENTS,
242 -((int64_t)rtextents), rsvd); 242 -((int64_t)rtextents), rsvd);
243 if (error) { 243 if (error) {
244 error = ENOSPC; 244 error = -ENOSPC;
245 goto undo_log; 245 goto undo_log;
246 } 246 }
247 tp->t_rtx_res += rtextents; 247 tp->t_rtx_res += rtextents;
@@ -874,7 +874,7 @@ xfs_trans_commit(
874 goto out_unreserve; 874 goto out_unreserve;
875 875
876 if (XFS_FORCED_SHUTDOWN(mp)) { 876 if (XFS_FORCED_SHUTDOWN(mp)) {
877 error = EIO; 877 error = -EIO;
878 goto out_unreserve; 878 goto out_unreserve;
879 } 879 }
880 880
@@ -917,7 +917,7 @@ out_unreserve:
917 if (tp->t_ticket) { 917 if (tp->t_ticket) {
918 commit_lsn = xfs_log_done(mp, tp->t_ticket, NULL, log_flags); 918 commit_lsn = xfs_log_done(mp, tp->t_ticket, NULL, log_flags);
919 if (commit_lsn == -1 && !error) 919 if (commit_lsn == -1 && !error)
920 error = EIO; 920 error = -EIO;
921 } 921 }
922 current_restore_flags_nested(&tp->t_pflags, PF_FSTRANS); 922 current_restore_flags_nested(&tp->t_pflags, PF_FSTRANS);
923 xfs_trans_free_items(tp, NULLCOMMITLSN, error ? XFS_TRANS_ABORT : 0); 923 xfs_trans_free_items(tp, NULLCOMMITLSN, error ? XFS_TRANS_ABORT : 0);