From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [PATCH] VFS: br_write_lock locks on possible CPUs other than online CPUs Date: Wed, 21 Dec 2011 14:12:29 -0800 Message-ID: <20111221141229.7f691c43.akpm@linux-foundation.org> References: <20111220062710.GC23916@ZenIV.linux.org.uk> <4EF03915.60902@linux.vnet.ibm.com> <1324373854.21588.16.camel@mengcong> <4EF0654B.4060904@linux.vnet.ibm.com> <4EF06C9B.4010703@linux.vnet.ibm.com> <4EF084A4.3000106@linux.vnet.ibm.com> <20111220140628.GD23916@ZenIV.linux.org.uk> <4EF09D34.1060607@linux.vnet.ibm.com> <20111220175919.GE23916@ZenIV.linux.org.uk> <4EF0DE04.6030604@linux.vnet.ibm.com> <20111220195806.GF23916@ZenIV.linux.org.uk> <4EF24C71.6000609@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Al Viro , mc@linux.vnet.ibm.com, Stephen Boyd , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Nick Piggin , david@fromorbit.com, Maciej Rutecki To: "Srivatsa S. Bhat" Return-path: In-Reply-To: <4EF24C71.6000609@linux.vnet.ibm.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Thu, 22 Dec 2011 02:45:29 +0530 "Srivatsa S. Bhat" wrote: off-topic, but the lockdep stuff in include/linux/lglock.h (LOCKDEP_INIT_MAP and DEFINE_LGLOCK_LOCKDEP) appears to be dead code. > --- a/include/linux/lglock.h > +++ b/include/linux/lglock.h > @@ -22,6 +22,7 @@ > #include > #include > #include > +#include > > /* can make br locks by using local lock for read side, global lock for write */ > #define br_lock_init(name) name##_lock_init() > @@ -72,9 +73,31 @@ > > #define DEFINE_LGLOCK(name) \ > \ > + DEFINE_SPINLOCK(name##_cpu_lock); \ > + cpumask_t name##_cpus __read_mostly; \ > DEFINE_PER_CPU(arch_spinlock_t, name##_lock); \ > DEFINE_LGLOCK_LOCKDEP(name); \ > \ also off-topic: we can't define a static lglock with this macro.