Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[firefly-linux-kernel-4.4.55.git] / fs / xfs / xfs_trans_priv.h
index 1b736294558a76f0498f7e034885ddc5ce9c1497..49931b72da8a8400f767a1cb7d368b31ce62c04b 100644 (file)
@@ -119,6 +119,21 @@ xfs_trans_ail_delete(
        xfs_trans_ail_delete_bulk(ailp, &lip, 1, shutdown_type);
 }
 
+static inline void
+xfs_trans_ail_remove(
+       struct xfs_log_item     *lip,
+       int                     shutdown_type)
+{
+       struct xfs_ail          *ailp = lip->li_ailp;
+
+       spin_lock(&ailp->xa_lock);
+       /* xfs_trans_ail_delete() drops the AIL lock */
+       if (lip->li_flags & XFS_LI_IN_AIL)
+               xfs_trans_ail_delete(ailp, lip, shutdown_type);
+       else
+               spin_unlock(&ailp->xa_lock);
+}
+
 void                   xfs_ail_push(struct xfs_ail *, xfs_lsn_t);
 void                   xfs_ail_push_all(struct xfs_ail *);
 void                   xfs_ail_push_all_sync(struct xfs_ail *);