Messages in this thread | | | Date | Tue, 26 Aug 2008 15:35:08 -0400 | From | Christoph Hellwig <> | Subject | Re: [2.6.27-rc4] XFS i_lock vs i_iolock... |
| |
On Tue, Aug 26, 2008 at 12:45:47PM +1000, Dave Chinner wrote: > XFS: prevent lockdep false positives when locking two inodes > > If we call xfs_lock_two_inodes() to grab both the iolock and > the ilock, then drop the ilocks on both inodes, then grab > them again (as xfs_swap_extents() does) then lockdep will > report a locking order problem. This is a false positive. > > To avoid this, disallow xfs_lock_two_inodes() fom locking both > inode locks at once - force calers to make two separate calls. > This means that nested dropping and regaining of the ilocks > will retain the same lockdep subclass and so lockdep will > not see anything wrong with this code.
Looks good. We probably don't need the #ifdef DEBUG as ASSERT is debug-only anyway.
| |