Prev: x86-32: Fix crashes with CPU hotplug on AMD machines
Next: v4 Add section count to memory_block
From: KAMEZAWA Hiroyuki on 5 Aug 2010 01:00 On Tue, 03 Aug 2010 08:39:50 -0500 Nathan Fontenot <nfont(a)austin.ibm.com> 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 <nfont(a)austin.ibm.com> Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu(a)jp.fujitsu.com> 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 <asm/atomic.h> > #include <asm/uaccess.h> > > +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(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Nathan Fontenot on 9 Aug 2010 10:00 On 08/04/2010 11:53 PM, KAMEZAWA Hiroyuki wrote: > On Tue, 03 Aug 2010 08:39:50 -0500 > Nathan Fontenot <nfont(a)austin.ibm.com> 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 <nfont(a)austin.ibm.com> > > Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu(a)jp.fujitsu.com> > > 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 <asm/atomic.h> >> #include <asm/uaccess.h> >> >> +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. > ok, fixed in the next version of the patches. -Nathan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|
Pages: 1 Prev: x86-32: Fix crashes with CPU hotplug on AMD machines Next: v4 Add section count to memory_block |