[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140120164801.GF2626@dhcp22.suse.cz>
Date: Mon, 20 Jan 2014 17:48:01 +0100
From: Michal Hocko <mhocko@...e.cz>
To: Vladimir Davydov <vdavydov@...allels.com>
Cc: akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Subject: Re: [PATCH TRIVIAL] memcg: remove unused code from
kmem_cache_destroy_work_func
OK, it seems as a left over from an earlier code reworks but
22933152934f3 doesn't seem to contain any code following that if-else
so maybe review driven changes.
On Mon 20-01-14 13:22:03, Vladimir Davydov wrote:
> Signed-off-by: Vladimir Davydov <vdavydov@...allels.com>
Reviewed-by: Michal Hocko <mhocko@...e.cz>
> ---
> mm/memcontrol.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 7f1a356..7f1511d 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -3311,11 +3311,9 @@ static void kmem_cache_destroy_work_func(struct work_struct *w)
> * So if we aren't down to zero, we'll just schedule a worker and try
> * again
> */
> - if (atomic_read(&cachep->memcg_params->nr_pages) != 0) {
> + if (atomic_read(&cachep->memcg_params->nr_pages) != 0)
> kmem_cache_shrink(cachep);
> - if (atomic_read(&cachep->memcg_params->nr_pages) == 0)
> - return;
> - } else
> + else
> kmem_cache_destroy(cachep);
> }
>
> --
> 1.7.10.4
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@...ck.org. For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@...ck.org"> email@...ck.org </a>
--
Michal Hocko
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists