diff options
author | Christoph Hellwig <hch@lst.de> | 2015-06-04 05:47:43 +0200 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2015-06-04 05:47:43 +0200 |
commit | eacb24e73424bdae4aa139ddd459f86ec46f0ad0 (patch) | |
tree | c0b4cf3832ad831ce0fb69ab58f44fc7043b03d4 /fs/xfs/xfs_trans.c | |
parent | xfs: switch remaining xfs_trans_dup users to xfs_trans_roll (diff) | |
download | linux-eacb24e73424bdae4aa139ddd459f86ec46f0ad0.tar.xz linux-eacb24e73424bdae4aa139ddd459f86ec46f0ad0.zip |
xfs: pass a boolean flag to xfs_trans_free_items
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>
Diffstat (limited to 'fs/xfs/xfs_trans.c')
-rw-r--r-- | fs/xfs/xfs_trans.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c index a2dfb302cf81..42a1adf81dad 100644 --- a/fs/xfs/xfs_trans.c +++ b/fs/xfs/xfs_trans.c @@ -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); } |