On Fri, Mar 19, 2021 at 06:35:37AM +0000, Christoph Hellwig wrote: > On Thu, Mar 18, 2021 at 11:05:34PM -0700, Darrick J. Wong wrote: > > xfs_inactive doesn't take the iolock because (evidently) at some point > > there were lockdep complaints about taking it in reclaim context. By > > the time the inode reaches inactivation context, there can't be any > > other users of it anyway -- the last caller dropped its reference, we > > tore down the VFS inode, and anyone who wants to resuscitate the inode > > will wait in xfs_iget for us to finish. > > Yes. What I meant is that if we can deduce that we are in inactive > somehow (probably using the VFS inode state) we can ASSERT that we > are either in inactive or hold the iolock. Yeah, I think we can do: ASSERT(xfs_isilocked(ip, XFS_IOLOCK_EXCL) || (VFS_I(ip)->i_state & I_FREEING)); --D