lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20201118124617.GR12284@dhcp22.suse.cz>
Date:   Wed, 18 Nov 2020 13:46:17 +0100
From:   Michal Hocko <mhocko@...e.com>
To:     Lukas Bulwahn <lukas.bulwahn@...il.com>
Cc:     Roman Gushchin <guro@...com>, Johannes Weiner <hannes@...xchg.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        cgroups@...r.kernel.org, linux-mm@...ck.org,
        Vladimir Davydov <vdavydov.dev@...il.com>,
        Arnd Bergmann <arnd@...db.de>, Tom Rix <trix@...hat.com>,
        Nathan Chancellor <natechancellor@...il.com>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        clang-built-linux@...glegroups.com,
        kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: memcg: remove obsolete memcg_has_children()

On Mon 16-11-20 06:50:43, Lukas Bulwahn wrote:
> Commit 2ef1bf118c40 ("mm: memcg: deprecate the non-hierarchical mode")
> removed the only use of memcg_has_children() in
> mem_cgroup_hierarchy_write() as part of the feature deprecation.
> 
> Hence, since then, make CC=clang W=1 warns:
> 
>   mm/memcontrol.c:3421:20:
>     warning: unused function 'memcg_has_children' [-Wunused-function]
> 
> Simply remove this obsolete unused function.
> 
> Signed-off-by: Lukas Bulwahn <lukas.bulwahn@...il.com>

git grep agrees
Acked-by: Michal Hocko <mhocko@...e.com>

> ---
> applies cleanly on next-20201113, not on current master
> 
> Roman, please ack.
> 
> Andrew, please pick this minor non-urgent patch into your -next tree.
> 
>  mm/memcontrol.c | 13 -------------
>  1 file changed, 13 deletions(-)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index f95ddb3e9898..d49d7c507284 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -3415,19 +3415,6 @@ unsigned long mem_cgroup_soft_limit_reclaim(pg_data_t *pgdat, int order,
>  	return nr_reclaimed;
>  }
>  
> -/*
> - * Test whether @memcg has children, dead or alive.
> - */
> -static inline bool memcg_has_children(struct mem_cgroup *memcg)
> -{
> -	bool ret;
> -
> -	rcu_read_lock();
> -	ret = css_next_child(NULL, &memcg->css);
> -	rcu_read_unlock();
> -	return ret;
> -}
> -
>  /*
>   * Reclaims as many pages from the given memcg as possible.
>   *
> -- 
> 2.17.1

-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ