From: Li Zefan <lizf@cn.fujitsu.com>
To: Daniel Walker <dwalker@mvista.com>
Cc: Ranjit Manomohan <ranjitm@google.com>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
menage@google.com, kaber@trash.net, akpm@linux-foundation.org
Subject: Re: [PATCH 2/2[ Traffic control cgroups subsystem
Date: Fri, 25 Jul 2008 11:29:42 +0800 [thread overview]
Message-ID: <488948A6.2050408@cn.fujitsu.com> (raw)
In-Reply-To: <1216954937.22487.1.camel@localhost.localdomain>
Daniel Walker wrote:
> On Thu, 2008-07-24 at 16:37 -0700, Ranjit Manomohan wrote:
>
>
>> +/* Delete one filter entry */
>> +static int cgroup_delete(struct tcf_proto *tp, unsigned long arg)
>> +{
>> + struct cgroup_head *head = (struct cgroup_head *) tp->root;
>> + struct cgroup_filter *t, *f = (struct cgroup_filter *) arg;
>> +
>> + list_for_each_entry(t, &head->flist, link)
>> + if (t == f) {
>> + tcf_tree_lock(tp);
>> + list_del(&t->link);
>
> Doesn't the above need to be a "_safe" list operation since your
> deleting the element?
>
No. You don't need "_safe" if you break out the loop immediately
after list_del().
next prev parent reply other threads:[~2008-07-25 3:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-24 23:37 [PATCH 2/2[ Traffic control cgroups subsystem Ranjit Manomohan
2008-07-25 3:02 ` Daniel Walker
2008-07-25 3:29 ` Li Zefan [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-09-10 17:43 [PATCH 2/2] " Ranjit Manomohan
2008-08-22 0:57 Ranjit Manomohan
2008-07-18 21:29 Ranjit Manomohan
2008-07-21 9:30 ` Li Zefan
2008-07-21 14:05 ` Patrick McHardy
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=488948A6.2050408@cn.fujitsu.com \
--to=lizf@cn.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=dwalker@mvista.com \
--cc=kaber@trash.net \
--cc=linux-kernel@vger.kernel.org \
--cc=menage@google.com \
--cc=netdev@vger.kernel.org \
--cc=ranjitm@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).