]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - fs/xfs/xfs_trans.c
xfs: global error sign conversion
[mirror_ubuntu-zesty-kernel.git] / fs / xfs / xfs_trans.c
index 6b9b48dfddaa71c07ec8a62e807c6fb22468987b..30e8e34109553d3aee7673382f8b2ab2e44c8446 100644 (file)
@@ -190,7 +190,7 @@ xfs_trans_reserve(
                                          -((int64_t)blocks), rsvd);
                if (error != 0) {
                        current_restore_flags_nested(&tp->t_pflags, PF_FSTRANS);
-                       return 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 = 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 = 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 = EIO;
+                       error = -EIO;
        }
        current_restore_flags_nested(&tp->t_pflags, PF_FSTRANS);
        xfs_trans_free_items(tp, NULLCOMMITLSN, error ? XFS_TRANS_ABORT : 0);