From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 17/18] fs: icache remove inode_lock Date: Fri, 15 Oct 2010 13:52:47 -0400 Message-ID: <20101015175247.GA6737@infradead.org> References: <20101014144159.GA11972@infradead.org> <20101015001443.GA3146@amd> <20101015031343.GG4681@dastard> <20101015033017.GA6750@amd> <20101015034451.GA6827@amd> <20101015064150.GB7511@amd> <20101015105943.GE32255@dastard> <20101015130259.GA3207@amd> <20101015132938.GA3936@amd> <20101015173345.GA10731@amd> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Dave Chinner , Christoph Hellwig , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: Nick Piggin Return-path: Received: from canuck.infradead.org ([134.117.69.58]:48891 "EHLO canuck.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755648Ab0JORw5 (ORCPT ); Fri, 15 Oct 2010 13:52:57 -0400 Content-Disposition: inline In-Reply-To: <20101015173345.GA10731@amd> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Thanks for trying to get back to a technical discussion. Maybe we can just move the technical comments to direct replies to the patches and leave this not very helpful subthread behind? > rcu_read_lock(); > list_for_each_entry(inode, list) { > if (inode->blah ...) { > spin_lock(&list_lock); > if (unlikely(list_empty(&inode->i_list))) > continue; > do_something(inode); > } > } But that't not what we do for icache. For the validity checking during lookup we check the I_FREEING bit, which is modified under i_lock and can be read without any locking. So everything is just fine when moving on to RCU locking.