[Top] [All Lists]

Re: [PATCH] xfs: only take the ILOCK in xfs_reclaim_inode()

To: Alex Elder <elder@xxxxxxxxxxxxx>
Subject: Re: [PATCH] xfs: only take the ILOCK in xfs_reclaim_inode()
From: Ben Myers <bpm@xxxxxxx>
Date: Sat, 25 Feb 2012 13:50:56 -0600
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1329429660.16207.19.camel@doink>
References: <1329429660.16207.19.camel@doink>
User-agent: Mutt/1.5.18 (2008-05-17)
On Thu, Feb 16, 2012 at 04:01:00PM -0600, Alex Elder wrote:
> At the end of xfs_reclaim_inode(), the inode is locked in order to
> we wait for a possible concurrent lookup to complete before the
> inode is freed.  This synchronization step was taking both the ILOCK
> and the IOLOCK, but the latter was causing lockdep to produce
> reports of the possibility of deadlock.
> It turns out that there's no need to acquire the IOLOCK at this
> point anyway.  It may have been required in some earlier version of
> the code, but there should be no need to take the IOLOCK in
> xfs_iget(), so there's no (longer) any need to get it here for
> synchronization.  Add an assertion in xfs_iget() as a reminder
> of this assumption.
> Dave Chinner diagnosed this on IRC, and Christoph Hellwig suggested
> no longer including the IOLOCK.  I just put together the patch.
> Signed-off-by: Alex Elder <elder@xxxxxxxxxxxxx>

Looks good.

Reviewed-by: Ben Myers <bpm@xxxxxxx>

<Prev in Thread] Current Thread [Next in Thread>