From: Jason Gunthorpe <jgg@nvidia.com>
To: Mark Zhang <markzhang@nvidia.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH] RDMA/cma: Split apart the multiple uses of the same list heads
Date: Mon, 4 Oct 2021 16:39:48 -0300 [thread overview]
Message-ID: <20211004193948.GA2565959@nvidia.com> (raw)
In-Reply-To: <67155640-e38d-ed1a-5af9-693f9c860f21@nvidia.com>
On Thu, Sep 16, 2021 at 01:11:14PM +0800, Mark Zhang wrote:
> > @@ -4928,10 +4930,10 @@ static void cma_process_remove(struct cma_device *cma_dev)
> > mutex_lock(&lock);
> > while (!list_empty(&cma_dev->id_list)) {
> > struct rdma_id_private *id_priv = list_first_entry(
> > - &cma_dev->id_list, struct rdma_id_private, list);
> > + &cma_dev->id_list, struct rdma_id_private, device_item);
> >
> > - list_del(&id_priv->listen_list);
> > - list_del_init(&id_priv->list);
> > + list_del_init(&id_priv->listen_item);
>
> Should it still be
> list_del(&id_priv->listen_list);
> as it isn't dev_id_priv?
Actually I misunderstood your question
Yes, it should be listen_item - it makes no sense to delete a
list - that would just randomly remove the first item.
At this point we are iterating over a device list and the rules have
device id_privs using the list_item side of the union. Only IDs on
the listen_any_list use the listen_list side.
Jason
next prev parent reply other threads:[~2021-10-04 19:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-15 16:25 [PATCH] RDMA/cma: Split apart the multiple uses of the same list heads Jason Gunthorpe
2021-09-16 5:11 ` Mark Zhang
2021-09-16 14:17 ` Jason Gunthorpe
2021-10-04 19:39 ` Jason Gunthorpe [this message]
2021-10-04 19:43 ` Jason Gunthorpe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211004193948.GA2565959@nvidia.com \
--to=jgg@nvidia.com \
--cc=linux-rdma@vger.kernel.org \
--cc=markzhang@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.