From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 16/18] fs: Make iunique independent of inode_lock Date: Fri, 8 Oct 2010 04:19:05 -0400 Message-ID: <20101008081905.GC17577@infradead.org> References: <1286515292-15882-1-git-send-email-david@fromorbit.com> <1286515292-15882-17-git-send-email-david@fromorbit.com> <20101008075524.GB30902@infradead.org> <20101008080655.GY4681@dastard> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: Dave Chinner Return-path: Received: from canuck.infradead.org ([134.117.69.58]:33133 "EHLO canuck.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755885Ab0JHITG (ORCPT ); Fri, 8 Oct 2010 04:19:06 -0400 Content-Disposition: inline In-Reply-To: <20101008080655.GY4681@dastard> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Oct 08, 2010 at 07:06:55PM +1100, Dave Chinner wrote: > On Fri, Oct 08, 2010 at 03:55:24AM -0400, Christoph Hellwig wrote: > > > + hlist_bl_for_each_entry(inode, node, &b->head, i_hash) { > > > + if (inode->i_ino == ino && inode->i_sb == sb) { > > > > wouldn't it be more natural to test the sb first here? > > Maybe, but I think an inode number match is less likely, so the > order it currently does the check results in less code being > executed on misses. Ok, sounds fine.