aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_inode.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-08-28 13:21:03 -0400
committerDarrick J. Wong <darrick.wong@oracle.com>2017-09-01 13:55:30 -0400
commit411350df14a3d6f1c769ea64a8b43a71f8d9760e (patch)
tree6ce47a2df6894777f7147bbc4fee7fca6e9fcc34 /fs/xfs/xfs_inode.c
parentf2e9ad212def50bcf4c098c6288779dd97fff0f0 (diff)
xfs: refactor xfs_trans_roll
Split xfs_trans_roll into a low-level helper that just rolls the actual transaction and a new higher level xfs_trans_roll_inode that takes care of logging and rejoining the inode. This gets rid of the NULL inode case, and allows to simplify the special cases in the deferred operation code. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r--fs/xfs/xfs_inode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index 97045e8dfed5..f739a031986d 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -1055,7 +1055,7 @@ xfs_dir_ialloc(
1055 tp->t_flags &= ~(XFS_TRANS_DQ_DIRTY); 1055 tp->t_flags &= ~(XFS_TRANS_DQ_DIRTY);
1056 } 1056 }
1057 1057
1058 code = xfs_trans_roll(&tp, NULL); 1058 code = xfs_trans_roll(&tp);
1059 if (committed != NULL) 1059 if (committed != NULL)
1060 *committed = 1; 1060 *committed = 1;
1061 1061
@@ -1611,7 +1611,7 @@ xfs_itruncate_extents(
1611 if (error) 1611 if (error)
1612 goto out_bmap_cancel; 1612 goto out_bmap_cancel;
1613 1613
1614 error = xfs_trans_roll(&tp, ip); 1614 error = xfs_trans_roll_inode(&tp, ip);
1615 if (error) 1615 if (error)
1616 goto out; 1616 goto out;
1617 } 1617 }