On Thu, Dec 23, 2010 at 10:31 PM, David Dillow <dillo...@ornl.gov> wrote:
> [ ... ]
> @@ -876,7 +876,7 @@ static int __srp_post_send(struct srp_target_port *target,
>        ret = ib_post_send(target->qp, &wr, &bad_wr);
>
>        if (!ret) {
> -               ++target->tx_head;
> +               list_del_init(&iu->list);

Why list_del_init() here instead of list_del() ?

> @@ -1212,6 +1196,9 @@ static int srp_alloc_iu_bufs(struct srp_target_port 
> *target)
>                                                  GFP_KERNEL, DMA_TO_DEVICE);
>                if (!target->tx_ring[i])
>                        goto err;
> +
> +               INIT_LIST_HEAD(&target->tx_ring[i]->list);
> +               list_add(&target->tx_ring[i]->list, &target->free_tx);

Why is INIT_LIST_HEAD() invoked above ? list_add() overwrites the prev
and next pointers that have been cleared by INIT_LIST_HEAD().

Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to