Commit bba7b164 authored by Darrick J. Wong's avatar Darrick J. Wong

xfs: refactor xlog_item_is_intent now that we're done converting

Now that we've finished converting all types of log intent items to
provide an ->iop_recover function, we can convert the "is this an intent
item?" predicate to look for a non-null iop_recover pointer.

Move the predicate closer to the functions that use it.
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: default avatarChandan Babu R <chandanrlinux@gmail.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
parent 9329ba89
...@@ -2546,20 +2546,6 @@ xlog_recover_process_data( ...@@ -2546,20 +2546,6 @@ xlog_recover_process_data(
return 0; return 0;
} }
/* Is this log item a deferred action intent? */
static inline bool xlog_item_is_intent(struct xfs_log_item *lip)
{
switch (lip->li_type) {
case XFS_LI_EFI:
case XFS_LI_RUI:
case XFS_LI_CUI:
case XFS_LI_BUI:
return true;
default:
return false;
}
}
/* Take all the collected deferred ops and finish them in order. */ /* Take all the collected deferred ops and finish them in order. */
static int static int
xlog_finish_defer_ops( xlog_finish_defer_ops(
...@@ -2594,6 +2580,12 @@ xlog_finish_defer_ops( ...@@ -2594,6 +2580,12 @@ xlog_finish_defer_ops(
return xfs_trans_commit(tp); return xfs_trans_commit(tp);
} }
/* Is this log item a deferred action intent? */
static inline bool xlog_item_is_intent(struct xfs_log_item *lip)
{
return lip->li_ops->iop_recover != NULL;
}
/* /*
* When this is called, all of the log intent items which did not have * When this is called, all of the log intent items which did not have
* corresponding log done items should be in the AIL. What we do now * corresponding log done items should be in the AIL. What we do now
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment