From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [PATCH 12/13] XFS: allow follow_link to often succeed in RCU-walk. Date: Mon, 16 Mar 2015 22:37:58 +0000 Message-ID: <20150316223758.GE29656@ZenIV.linux.org.uk> References: <20150316043602.23648.52734.stgit@notabene.brown> <20150316044320.23648.84610.stgit@notabene.brown> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: NeilBrown Return-path: Content-Disposition: inline In-Reply-To: <20150316044320.23648.84610.stgit@notabene.brown> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Mon, Mar 16, 2015 at 03:43:20PM +1100, NeilBrown wrote: > - xfs_ilock(ip, XFS_ILOCK_SHARED); > + if (rcu) { > + if (xfs_ilock_nowait(ip, XFS_ILOCK_SHARED) == 0) > + return -ECHILD; Umm... Is that guaranteed to be safe for inode that is currently going through xfs ->evict_inode()? struct inode getting freed is RCU-delayed; ->evict_inode() is *not*. It can happen right under you in RCU pathwalk.