From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail137.messagelabs.com (mail137.messagelabs.com [216.82.249.19]) by kanga.kvack.org (Postfix) with ESMTP id 8323E8D0039 for ; Fri, 21 Jan 2011 04:18:21 -0500 (EST) Date: Fri, 21 Jan 2011 18:17:22 +0900 From: Daisuke Nishimura Subject: Re: [PATCH 7/7] memcg : remove ugly vairable initialization by callers Message-Id: <20110121181722.896c053c.nishimura@mxp.nes.nec.co.jp> In-Reply-To: <20110121155051.0b309b1f.kamezawa.hiroyu@jp.fujitsu.com> References: <20110121153431.191134dd.kamezawa.hiroyu@jp.fujitsu.com> <20110121155051.0b309b1f.kamezawa.hiroyu@jp.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org To: KAMEZAWA Hiroyuki Cc: "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "hannes@cmpxchg.org" , "balbir@linux.vnet.ibm.com" , "akpm@linux-foundation.org" , Daisuke Nishimura List-ID: On Fri, 21 Jan 2011 15:50:51 +0900 KAMEZAWA Hiroyuki wrote: > This is a promised one. > == > From: KAMEZAWA Hiroyuki > > This patch is for removing initialization in caller of memory cgroup > function. Some memory cgroup uses following style to bring the result > of start function to the end function for avoiding races. > > mem_cgroup_start_A(&(*ptr)) > /* Something very complicated can happen here. */ > mem_cgroup_end_A(*ptr) > > In some calls, *ptr should be initialized to NULL be caller. But > it's ugly. This patch fixes that *ptr is initialized by _start > function. > > Signed-off-by: KAMEZAWA Hiroyuki Acked-by: Daisuke Nishimura -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/ Don't email: email@kvack.org