xfs: Nuke XFS_ERROR macro
XFS_ERROR was designed long ago to trap return values, but it's not runtime configurable, it's not consistently used, and we can do similar error trapping with ftrace scripts and triggers from userspace. Just nuke XFS_ERROR and associated bits. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:

committed by
Dave Chinner

parent
d99831ff39
commit
b474c7ae43
@@ -190,7 +190,7 @@ xfs_trans_reserve(
|
||||
-((int64_t)blocks), rsvd);
|
||||
if (error != 0) {
|
||||
current_restore_flags_nested(&tp->t_pflags, PF_FSTRANS);
|
||||
return XFS_ERROR(ENOSPC);
|
||||
return ENOSPC;
|
||||
}
|
||||
tp->t_blk_res += blocks;
|
||||
}
|
||||
@@ -241,7 +241,7 @@ xfs_trans_reserve(
|
||||
error = xfs_mod_incore_sb(tp->t_mountp, XFS_SBS_FREXTENTS,
|
||||
-((int64_t)rtextents), rsvd);
|
||||
if (error) {
|
||||
error = XFS_ERROR(ENOSPC);
|
||||
error = ENOSPC;
|
||||
goto undo_log;
|
||||
}
|
||||
tp->t_rtx_res += rtextents;
|
||||
@@ -874,7 +874,7 @@ xfs_trans_commit(
|
||||
goto out_unreserve;
|
||||
|
||||
if (XFS_FORCED_SHUTDOWN(mp)) {
|
||||
error = XFS_ERROR(EIO);
|
||||
error = EIO;
|
||||
goto out_unreserve;
|
||||
}
|
||||
|
||||
@@ -917,7 +917,7 @@ out_unreserve:
|
||||
if (tp->t_ticket) {
|
||||
commit_lsn = xfs_log_done(mp, tp->t_ticket, NULL, log_flags);
|
||||
if (commit_lsn == -1 && !error)
|
||||
error = XFS_ERROR(EIO);
|
||||
error = EIO;
|
||||
}
|
||||
current_restore_flags_nested(&tp->t_pflags, PF_FSTRANS);
|
||||
xfs_trans_free_items(tp, NULLCOMMITLSN, error ? XFS_TRANS_ABORT : 0);
|
||||
|
Reference in New Issue
Block a user