mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
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>
This commit is contained in:
parent
f2e9ad212d
commit
411350df14
9 changed files with 48 additions and 56 deletions
|
@ -1055,7 +1055,7 @@ xfs_dir_ialloc(
|
|||
tp->t_flags &= ~(XFS_TRANS_DQ_DIRTY);
|
||||
}
|
||||
|
||||
code = xfs_trans_roll(&tp, NULL);
|
||||
code = xfs_trans_roll(&tp);
|
||||
if (committed != NULL)
|
||||
*committed = 1;
|
||||
|
||||
|
@ -1611,7 +1611,7 @@ xfs_itruncate_extents(
|
|||
if (error)
|
||||
goto out_bmap_cancel;
|
||||
|
||||
error = xfs_trans_roll(&tp, ip);
|
||||
error = xfs_trans_roll_inode(&tp, ip);
|
||||
if (error)
|
||||
goto out;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue