xfs: remove the ip argument to xfs_defer_finish

And instead require callers to explicitly join the inode using
xfs_defer_ijoin.  Also consolidate the defer error handling in
a few places using a goto label.

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:
Christoph Hellwig
2017-08-28 10:21:04 -07:00
committed by Darrick J. Wong
vanhempi 882d8785fb
commit 8ad7c629b1
15 muutettua tiedostoa jossa 129 lisäystä ja 116 poistoa

Näytä tiedosto

@@ -277,8 +277,7 @@ xfs_defer_has_unfinished_work(
/*
* Add this inode to the deferred op. Each joined inode is relogged
* each time we roll the transaction, in addition to any inode passed
* to xfs_defer_finish().
* each time we roll the transaction.
*/
int
xfs_defer_ijoin(
@@ -310,8 +309,7 @@ xfs_defer_ijoin(
int
xfs_defer_finish(
struct xfs_trans **tp,
struct xfs_defer_ops *dop,
struct xfs_inode *ip)
struct xfs_defer_ops *dop)
{
struct xfs_defer_pending *dfp;
struct list_head *li;
@@ -324,8 +322,6 @@ xfs_defer_finish(
trace_xfs_defer_finish((*tp)->t_mountp, dop);
xfs_defer_ijoin(dop, ip);
/* Until we run out of pending work to finish... */
while (xfs_defer_has_unfinished_work(dop)) {
/* Log intents for work items sitting in the intake. */