summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_extfree_item.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_extfree_item.c')
-rw-r--r--fs/xfs/xfs_extfree_item.c44
1 files changed, 11 insertions, 33 deletions
diff --git a/fs/xfs/xfs_extfree_item.c b/fs/xfs/xfs_extfree_item.c
index ffa15bcaea33..a8ee9aaef50d 100644
--- a/fs/xfs/xfs_extfree_item.c
+++ b/fs/xfs/xfs_extfree_item.c
@@ -581,16 +581,18 @@ const struct xfs_defer_op_type xfs_agfl_free_defer_type = {
* the log. We need to free the extents that it describes.
*/
STATIC int
-xfs_efi_recover(
- struct xfs_mount *mp,
- struct xfs_efi_log_item *efip)
+xfs_efi_item_recover(
+ struct xfs_log_item *lip,
+ struct xfs_trans *parent_tp)
{
- struct xfs_efd_log_item *efdp;
- struct xfs_trans *tp;
- int i;
- int error = 0;
- xfs_extent_t *extp;
- xfs_fsblock_t startblock_fsb;
+ struct xfs_efi_log_item *efip = EFI_ITEM(lip);
+ struct xfs_mount *mp = parent_tp->t_mountp;
+ struct xfs_efd_log_item *efdp;
+ struct xfs_trans *tp;
+ struct xfs_extent *extp;
+ xfs_fsblock_t startblock_fsb;
+ int i;
+ int error = 0;
ASSERT(!test_bit(XFS_LI_RECOVERED, &efip->efi_item.li_flags));
@@ -641,30 +643,6 @@ abort_error:
return error;
}
-/* Recover the EFI if necessary. */
-STATIC int
-xfs_efi_item_recover(
- struct xfs_log_item *lip,
- struct xfs_trans *tp)
-{
- struct xfs_ail *ailp = lip->li_ailp;
- struct xfs_efi_log_item *efip;
- int error;
-
- /*
- * Skip EFIs that we've already processed.
- */
- efip = container_of(lip, struct xfs_efi_log_item, efi_item);
- if (test_bit(XFS_LI_RECOVERED, &efip->efi_item.li_flags))
- return 0;
-
- spin_unlock(&ailp->ail_lock);
- error = xfs_efi_recover(tp->t_mountp, efip);
- spin_lock(&ailp->ail_lock);
-
- return error;
-}
-
STATIC bool
xfs_efi_item_match(
struct xfs_log_item *lip,