2015-05-04 00:41:43

by Zefan Li

[permalink] [raw]
Subject: [PATCH] blkcg: remove redundant code in blkcg_css_free()

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

Signed-off-by: Zefan Li <[email protected]>
---
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


2015-05-04 16:16:28

by Tejun Heo

[permalink] [raw]
Subject: Re: [PATCH] blkcg: remove redundant code in blkcg_css_free()

On Mon, May 04, 2015 at 08:41:16AM +0800, Zefan Li wrote:
> The check was needed only when we supported modular cgroup subsystem.
>
> Signed-off-by: Zefan Li <[email protected]>

Acked-by: Tejun Heo <[email protected]>

Jens, can you please take this patch or shall I route it through the
cgroup tree?

Thanks.

--
tejun