]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
xfs: pass a boolean flag to xfs_trans_free_items
authorChristoph Hellwig <hch@lst.de>
Thu, 4 Jun 2015 03:47:43 +0000 (13:47 +1000)
committerDave Chinner <david@fromorbit.com>
Thu, 4 Jun 2015 03:47:43 +0000 (13:47 +1000)
The flags value always was 0 or XFS_TRANS_ABORT.  Switch to a bool
parameter to allow further cleanups.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_log_cil.c
fs/xfs/xfs_trans.c
fs/xfs/xfs_trans_priv.h

index 45cc0ce18adf04cac50fe801884439a246285443..7e0e63eb4802a90350510f265e22c646aa1fd213 100644 (file)
@@ -809,7 +809,7 @@ xfs_log_commit_cil(
         * the log items. This affects (at least) processing of stale buffers,
         * inodes and EFIs.
         */
-       xfs_trans_free_items(tp, tp->t_commit_lsn, 0);
+       xfs_trans_free_items(tp, tp->t_commit_lsn, false);
 
        xlog_cil_push_background(log);
 
index a2dfb302cf819fbdce1c821bc2014a3913fa2dec..42a1adf81dad498484625ef0863a98e3757d0dcd 100644 (file)
@@ -744,7 +744,7 @@ void
 xfs_trans_free_items(
        struct xfs_trans        *tp,
        xfs_lsn_t               commit_lsn,
-       int                     flags)
+       bool                    abort)
 {
        struct xfs_log_item_desc *lidp, *next;
 
@@ -755,7 +755,7 @@ xfs_trans_free_items(
 
                if (commit_lsn != NULLCOMMITLSN)
                        lip->li_ops->iop_committing(lip, commit_lsn);
-               if (flags & XFS_TRANS_ABORT)
+               if (abort)
                        lip->li_flags |= XFS_LI_ABORTED;
                lip->li_ops->iop_unlock(lip);
 
@@ -969,7 +969,7 @@ out_unreserve:
                        error = -EIO;
        }
        current_restore_flags_nested(&tp->t_pflags, PF_FSTRANS);
-       xfs_trans_free_items(tp, NULLCOMMITLSN, error ? XFS_TRANS_ABORT : 0);
+       xfs_trans_free_items(tp, NULLCOMMITLSN, !!error);
        xfs_trans_free(tp);
 
        XFS_STATS_INC(xs_trans_empty);
@@ -1031,7 +1031,7 @@ xfs_trans_cancel(
        /* mark this thread as no longer being in a transaction */
        current_restore_flags_nested(&tp->t_pflags, PF_FSTRANS);
 
-       xfs_trans_free_items(tp, NULLCOMMITLSN, flags);
+       xfs_trans_free_items(tp, NULLCOMMITLSN, flags & XFS_TRANS_ABORT);
        xfs_trans_free(tp);
 }
 
index bd1281862ad795c8a4b4536d377341403b388c65..1b736294558a76f0498f7e034885ddc5ce9c1497 100644 (file)
@@ -30,7 +30,7 @@ void  xfs_trans_init(struct xfs_mount *);
 void   xfs_trans_add_item(struct xfs_trans *, struct xfs_log_item *);
 void   xfs_trans_del_item(struct xfs_log_item *);
 void   xfs_trans_free_items(struct xfs_trans *tp, xfs_lsn_t commit_lsn,
-                               int flags);
+                               bool abort);
 void   xfs_trans_unreserve_and_mod_sb(struct xfs_trans *tp);
 
 void   xfs_trans_committed_bulk(struct xfs_ail *ailp, struct xfs_log_vec *lv,