From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zefan Li Subject: [PATCH] blkcg: remove redundant code in blkcg_css_free() Date: Mon, 4 May 2015 08:41:16 +0800 Message-ID: <5546C02C.3060803@huawei.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" To: Tejun Heo Cc: Jens Axboe , LKML , Cgroups The check was needed only when we supported modular cgroup subsystem. Signed-off-by: Zefan Li --- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751549AbbEDAln (ORCPT ); Sun, 3 May 2015 20:41:43 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:13078 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750977AbbEDAle (ORCPT ); Sun, 3 May 2015 20:41:34 -0400 Message-ID: <5546C02C.3060803@huawei.com> Date: Mon, 4 May 2015 08:41:16 +0800 From: Zefan Li User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: Tejun Heo CC: Jens Axboe , LKML , Cgroups Subject: [PATCH] blkcg: remove redundant code in blkcg_css_free() X-Enigmail-Version: 1.6 Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.18.230] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The check was needed only when we supported modular cgroup subsystem. Signed-off-by: Zefan Li --- 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