Merge tag 'gfs2-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2...
[firefly-linux-kernel-4.4.55.git] / fs / xfs / xfs_extfree_item.c
index ce1d4fb39c4d1e7881fe3fbf3f5eba593e8d2905..4aa0153214f91fb9ec03621c0b006317ca3d0e09 100644 (file)
@@ -286,20 +286,8 @@ void
 xfs_efi_release(
        struct xfs_efi_log_item *efip)
 {
-       struct xfs_ail          *ailp = efip->efi_item.li_ailp;
-
        if (atomic_dec_and_test(&efip->efi_refcount)) {
-               spin_lock(&ailp->xa_lock);
-               /*
-                * We don't know whether the EFI made it to the AIL. Remove it
-                * if so. Note that xfs_trans_ail_delete() drops the AIL lock.
-                */
-               if (efip->efi_item.li_flags & XFS_LI_IN_AIL)
-                       xfs_trans_ail_delete(ailp, &efip->efi_item,
-                                            SHUTDOWN_LOG_IO_ERROR);
-               else
-                       spin_unlock(&ailp->xa_lock);
-
+               xfs_trans_ail_remove(&efip->efi_item, SHUTDOWN_LOG_IO_ERROR);
                xfs_efi_item_free(efip);
        }
 }