Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755690AbcC2A4X (ORCPT ); Mon, 28 Mar 2016 20:56:23 -0400 Received: from resqmta-ch2-09v.sys.comcast.net ([69.252.207.41]:38351 "EHLO resqmta-ch2-09v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755625AbcC2A4S (ORCPT ); Mon, 28 Mar 2016 20:56:18 -0400 Date: Mon, 28 Mar 2016 19:56:15 -0500 (CDT) From: Christoph Lameter X-X-Sender: cl@east.gentwo.org To: js1304@gmail.com cc: Andrew Morton , Pekka Enberg , David Rientjes , Jesper Dangaard Brouer , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Joonsoo Kim Subject: Re: [PATCH 04/11] mm/slab: factor out kmem_cache_node initialization code In-Reply-To: <1459142821-20303-5-git-send-email-iamjoonsoo.kim@lge.com> Message-ID: References: <1459142821-20303-1-git-send-email-iamjoonsoo.kim@lge.com> <1459142821-20303-5-git-send-email-iamjoonsoo.kim@lge.com> Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 403 Lines: 17 On Mon, 28 Mar 2016, js1304@gmail.com wrote: > From: Joonsoo Kim > - spin_lock_irq(&n->list_lock); > - n->free_limit = > - (1 + nr_cpus_node(node)) * > - cachep->batchcount + cachep->num; > - spin_unlock_irq(&n->list_lock); > + ret = init_cache_node(cachep, node, GFP_KERNEL); > + if (ret) > + return ret; Drop ret and do a return init_cache_node(...); instead?