All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zefan Li <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
To: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Jens Axboe <axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org>,
	LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Cgroups <cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: [PATCH] blkcg: remove redundant code in blkcg_css_free()
Date: Mon, 4 May 2015 08:41:16 +0800	[thread overview]
Message-ID: <5546C02C.3060803@huawei.com> (raw)

The check was needed only when we supported modular cgroup subsystem.

Signed-off-by: Zefan Li <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
---
 block/blk-cgroup.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index 0ac817b..92b7edd 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -814,9 +814,7 @@ static void blkcg_css_offline(struct cgroup_subsys_state *css)
 static void blkcg_css_free(struct cgroup_subsys_state *css)
 {
 	struct blkcg *blkcg = css_to_blkcg(css);
-
-	if (blkcg != &blkcg_root)
-		kfree(blkcg);
+	kfree(blkcg);
 }
 
 static struct cgroup_subsys_state *
-- 
1.9.1

WARNING: multiple messages have this Message-ID (diff)
From: Zefan Li <lizefan@huawei.com>
To: Tejun Heo <tj@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>, LKML <linux-kernel@vger.kernel.org>,
	Cgroups <cgroups@vger.kernel.org>
Subject: [PATCH] blkcg: remove redundant code in blkcg_css_free()
Date: Mon, 4 May 2015 08:41:16 +0800	[thread overview]
Message-ID: <5546C02C.3060803@huawei.com> (raw)

The check was needed only when we supported modular cgroup subsystem.

Signed-off-by: Zefan Li <lizefan@huawei.com>
---
 block/blk-cgroup.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index 0ac817b..92b7edd 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -814,9 +814,7 @@ static void blkcg_css_offline(struct cgroup_subsys_state *css)
 static void blkcg_css_free(struct cgroup_subsys_state *css)
 {
 	struct blkcg *blkcg = css_to_blkcg(css);
-
-	if (blkcg != &blkcg_root)
-		kfree(blkcg);
+	kfree(blkcg);
 }
 
 static struct cgroup_subsys_state *
-- 
1.9.1


             reply	other threads:[~2015-05-04  0:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-04  0:41 Zefan Li [this message]
2015-05-04  0:41 ` [PATCH] blkcg: remove redundant code in blkcg_css_free() Zefan Li
     [not found] ` <5546C02C.3060803-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2015-05-04 16:16   ` Tejun Heo
2015-05-04 16:16     ` Tejun Heo

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=5546C02C.3060803@huawei.com \
    --to=lizefan-hv44wf8li93qt0dzr+alfa@public.gmane.org \
    --cc=axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org \
    --cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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 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.