xfs: reduce the number of pagb_lock roundtrips in xfs_alloc_clear_busy
[pandora-kernel.git] / fs / xfs / xfs_log_cil.c
index 9ca59be..7d56e88 100644 (file)
@@ -361,13 +361,12 @@ xlog_cil_committed(
        int     abort)
 {
        struct xfs_cil_ctx      *ctx = args;
-       struct xfs_busy_extent  *busyp, *n;
 
        xfs_trans_committed_bulk(ctx->cil->xc_log->l_ailp, ctx->lv_chain,
                                        ctx->start_lsn, abort);
 
-       list_for_each_entry_safe(busyp, n, &ctx->busy_extents, list)
-               xfs_alloc_busy_clear(ctx->cil->xc_log->l_mp, busyp);
+       xfs_alloc_busy_sort(&ctx->busy_extents);
+       xfs_alloc_busy_clear(ctx->cil->xc_log->l_mp, &ctx->busy_extents);
 
        spin_lock(&ctx->cil->xc_cil_lock);
        list_del(&ctx->committing);