linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Menage <menage@google.com>
To: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: "Randy Dunlap" <randy.dunlap@oracle.com>,
	linux-decnet-user@lists.sourceforge.net,
	"Trond Myklebust" <Trond.Myklebust@netapp.com>,
	linux-sctp@vger.kernel.org, "Pavel Emelyanov" <xemul@openvz.org>,
	"Pekka Savola (ipv6)" <pekkas@netcore.fi>,
	"Eric Dumazet" <eric.dumazet@gmail.com>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Alexey Kuznetsov" <kuznet@ms2.inr.ac.ru>,
	"Ingo Molnar" <mingo@elte.hu>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	"Sridhar Samudrala" <sri@us.ibm.com>,
	"Vlad Yasevich" <vladislav.yasevich@hp.com>,
	"Hagen Paul Pfeifer" <hagen-GvnIQ6b/HdU@public.gmane.org>,
	"John W. Linville"
	<linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>,
	"Al Viro" <viro@zeniv.linux.org.uk>,
	"Jens Axboe" <axboe@kernel.dk>,
	linux-nfs@vger.kernel.org, "Jiri Pirko" <jpirko@redhat.com>
Subject: Re: [PATCH 02/17] cgroup, rcu: convert call_rcu(free_cgroup_rcu) to kfree_rcu()
Date: Tue, 15 Mar 2011 13:04:00 -0700	[thread overview]
Message-ID: <AANLkTim-BeRO7DJA4bqKrxED4FbWeV3R-U6cciEkyUQo@mail.gmail.com> (raw)
In-Reply-To: <4D7F3784.6090307@cn.fujitsu.com>

2011/3/15 Lai Jiangshan <laijs@cn.fujitsu.com>:
>
> The rcu callback free_cgroup_rcu() just calls a kfree(),
> so we use kfree_rcu() instead of the call_rcu(free_cgroup_rcu).
>
> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>

Acked-by: Paul Menage <menage@google.com>

> ---
> =A0kernel/cgroup.c | =A0 =A09 +--------
> =A01 files changed, 1 insertions(+), 8 deletions(-)
>
> diff --git a/kernel/cgroup.c b/kernel/cgroup.c
> index ad485d4..5c83c91 100644
> --- a/kernel/cgroup.c
> +++ b/kernel/cgroup.c
> @@ -806,13 +806,6 @@ static int cgroup_call_pre_destroy(struct cgroup *cg=
rp)
> =A0 =A0 =A0 =A0return ret;
> =A0}
>
> -static void free_cgroup_rcu(struct rcu_head *obj)
> -{
> - =A0 =A0 =A0 struct cgroup *cgrp =3D container_of(obj, struct cgroup, rc=
u_head);
> -
> - =A0 =A0 =A0 kfree(cgrp);
> -}
> -
> =A0static void cgroup_diput(struct dentry *dentry, struct inode *inode)
> =A0{
> =A0 =A0 =A0 =A0/* is dentry a directory ? if so, kfree() associated cgrou=
p */
> @@ -850,7 +843,7 @@ static void cgroup_diput(struct dentry *dentry, struc=
t inode *inode)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 */
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0BUG_ON(!list_empty(&cgrp->pidlists));
>
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 call_rcu(&cgrp->rcu_head, free_cgroup_rcu);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 kfree_rcu(cgrp, rcu_head);
> =A0 =A0 =A0 =A0}
> =A0 =A0 =A0 =A0iput(inode);
> =A0}
> --
> 1.7.4
>

  parent reply	other threads:[~2011-03-15 20:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4D7F3610.6000809@cn.fujitsu.com>
     [not found] ` <4D7F372A.6050407@cn.fujitsu.com>
2011-03-15 20:03   ` [PATCH 01/17] cgroup, rcu: convert call_rcu(free_css_set_rcu) to kfree_rcu() Paul Menage
     [not found] ` <4D7F3784.6090307@cn.fujitsu.com>
2011-03-15 20:04   ` Paul Menage [this message]
     [not found] ` <4D7F37BA.5000308@cn.fujitsu.com>
2011-03-15 20:04   ` [PATCH 03/17] cgroup, rcu: convert call_rcu(__free_css_id_cb) " Paul Menage
     [not found] ` <4D7F37F0.1050801@cn.fujitsu.com>
2011-03-15 21:02   ` [PATCH 04/17] net,rcu: convert call_rcu(tcf_common_free_rcu) " David Miller
     [not found] ` <4D7F3828.4040403@cn.fujitsu.com>
2011-03-15 21:02   ` [PATCH 05/17] net,rcu: convert call_rcu(tcf_police_free_rcu) " David Miller
     [not found] ` <4D7F3872.6090305@cn.fujitsu.com>
2011-03-15 21:03   ` [PATCH 06/17] net,rcu: convert call_rcu(in6_dev_finish_destroy_rcu) " David Miller
     [not found] ` <4D7F38AE.7060708@cn.fujitsu.com>
2011-03-15 21:03   ` [PATCH 07/17] net,rcu: convert call_rcu(inet6_ifa_finish_destroy_rcu) " David Miller
     [not found] ` <4D7F3906.3090107@cn.fujitsu.com>
2011-03-15 21:03   ` [PATCH 08/17] net,rcu: convert call_rcu(listeners_free_rcu) " David Miller
     [not found] ` <4D7F39CE.80403@cn.fujitsu.com>
2011-03-15 21:03   ` [PATCH 11/17] net,rcu: convert call_rcu(sctp_local_addr_free) " David Miller
     [not found] ` <4D7F3ABA.7020709@cn.fujitsu.com>
2011-03-15 21:04   ` [PATCH 15/17] net,rcu: convert call_rcu(ha_rcu_free) " David Miller
     [not found] ` <4D7F3B04.9080504@cn.fujitsu.com>
2011-03-15 21:04   ` [PATCH 16/17] net,rcu: convert call_rcu(dn_dev_free_ifa_rcu) " David Miller
     [not found] ` <4D7F3B62.6000005@cn.fujitsu.com>
2011-03-15 11:04   ` [PATCH 17/17] net,act_police,rcu: remove rcu_barrier() Eric Dumazet
2011-03-16  3:13     ` Lai Jiangshan
2011-03-15 21:04   ` David Miller

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=AANLkTim-BeRO7DJA4bqKrxED4FbWeV3R-U6cciEkyUQo@mail.gmail.com \
    --to=menage@google.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=axboe@kernel.dk \
    --cc=eric.dumazet@gmail.com \
    --cc=hagen-GvnIQ6b/HdU@public.gmane.org \
    --cc=jpirko@redhat.com \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-decnet-user@lists.sourceforge.net \
    --cc=linux-nfs@vger.kernel.org \
    --cc=linux-sctp@vger.kernel.org \
    --cc=linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org \
    --cc=mingo@elte.hu \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=pekkas@netcore.fi \
    --cc=randy.dunlap@oracle.com \
    --cc=sri@us.ibm.com \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=viro@zeniv.linux.org.uk \
    --cc=vladislav.yasevich@hp.com \
    --cc=xemul@openvz.org \
    /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).