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:

committed by
Darrick J. Wong

parent
f2e9ad212d
commit
411350df14
@@ -2608,7 +2608,7 @@ xfs_attr3_leaf_clearflag(
|
||||
/*
|
||||
* Commit the flag value change and start the next trans in series.
|
||||
*/
|
||||
return xfs_trans_roll(&args->trans, args->dp);
|
||||
return xfs_trans_roll_inode(&args->trans, args->dp);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2659,7 +2659,7 @@ xfs_attr3_leaf_setflag(
|
||||
/*
|
||||
* Commit the flag value change and start the next trans in series.
|
||||
*/
|
||||
return xfs_trans_roll(&args->trans, args->dp);
|
||||
return xfs_trans_roll_inode(&args->trans, args->dp);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2777,7 +2777,7 @@ xfs_attr3_leaf_flipflags(
|
||||
/*
|
||||
* Commit the flag value change and start the next trans in series.
|
||||
*/
|
||||
error = xfs_trans_roll(&args->trans, args->dp);
|
||||
error = xfs_trans_roll_inode(&args->trans, args->dp);
|
||||
|
||||
return error;
|
||||
}
|
||||
|
Reference in New Issue
Block a user