xfs: correctly decrement the extent buffer index in xfs_bmap_del_extent
[pandora-kernel.git] / fs / xfs / xfs_trans.c
index 7692279..7c7bc2b 100644 (file)
@@ -608,10 +608,8 @@ STATIC void
 xfs_trans_free(
        struct xfs_trans        *tp)
 {
-       struct xfs_busy_extent  *busyp, *n;
-
-       list_for_each_entry_safe(busyp, n, &tp->t_busy, list)
-               xfs_alloc_busy_clear(tp->t_mountp, busyp);
+       xfs_alloc_busy_sort(&tp->t_busy);
+       xfs_alloc_busy_clear(tp->t_mountp, &tp->t_busy, false);
 
        atomic_dec(&tp->t_mountp->m_active_trans);
        xfs_trans_free_dqinfo(tp);