From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [PATCH 01/17] kernel: add bl_list Date: Wed, 29 Sep 2010 21:52:08 -0700 Message-ID: <20100929215208.b0206460.akpm@linux-foundation.org> References: <1285762729-17928-1-git-send-email-david@fromorbit.com> <1285762729-17928-2-git-send-email-david@fromorbit.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: Dave Chinner Return-path: Received: from smtp1.linux-foundation.org ([140.211.169.13]:40880 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751165Ab0I3EvJ (ORCPT ); Thu, 30 Sep 2010 00:51:09 -0400 In-Reply-To: <1285762729-17928-2-git-send-email-david@fromorbit.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, 29 Sep 2010 22:18:33 +1000 Dave Chinner wrote: > From: Nick Piggin > > Introduce a type of hlist that can support the use of the lowest bit > in the hlist_head. This will be subsequently used to implement > per-bucket bit spinlock for inode hashes. > > > ... > > +static inline void INIT_HLIST_BL_NODE(struct hlist_bl_node *h) > +{ > + h->next = NULL; > + h->pprev = NULL; > +} No need to shout. > > ... > > +static inline void hlist_bl_del(struct hlist_bl_node *n) > +{ > + __hlist_bl_del(n); > + n->next = LIST_POISON1; > + n->pprev = LIST_POISON2; > +} I'd suggest creating new poison values for hlist_bl's, leave LIST_POISON1 and LIST_POISON2 for list_head (and any other list variants which went and used them :() > > ... >