Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757226Ab0HEE6O (ORCPT ); Thu, 5 Aug 2010 00:58:14 -0400 Received: from fgwmail5.fujitsu.co.jp ([192.51.44.35]:47445 "EHLO fgwmail5.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751033Ab0HEE6J (ORCPT ); Thu, 5 Aug 2010 00:58:09 -0400 X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 Date: Thu, 5 Aug 2010 13:53:14 +0900 From: KAMEZAWA Hiroyuki To: Nathan Fontenot Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@ozlabs.org, Greg KH , Dave Hansen Subject: Re: [PATCH 4/9] v4 Add mutex for add/remove of memory blocks Message-Id: <20100805135314.7229d07c.kamezawa.hiroyu@jp.fujitsu.com> In-Reply-To: <4C581C26.5080007@austin.ibm.com> References: <4C581A6D.9030908@austin.ibm.com> <4C581C26.5080007@austin.ibm.com> Organization: FUJITSU Co. LTD. X-Mailer: Sylpheed 3.0.3 (GTK+ 2.10.14; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1276 Lines: 38 On Tue, 03 Aug 2010 08:39:50 -0500 Nathan Fontenot wrote: > Add a new mutex for use in adding and removing of memory blocks. This > is needed to avoid any race conditions in which the same memory block could > be added and removed at the same time. > > Signed-off-by: Nathan Fontenot Acked-by: KAMEZAWA Hiroyuki But a nitpick (see below) > --- > drivers/base/memory.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > Index: linux-2.6/drivers/base/memory.c > =================================================================== > --- linux-2.6.orig/drivers/base/memory.c 2010-08-02 13:35:00.000000000 -0500 > +++ linux-2.6/drivers/base/memory.c 2010-08-02 13:45:34.000000000 -0500 > @@ -27,6 +27,8 @@ > #include > #include > > +static struct mutex mem_sysfs_mutex; > + For static symbol of mutex, we usually do static DEFINE_MUTEX(mem_sysfs_mutex); Then, extra calls of mutex_init() is not required. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/