On Fri, Mar 19, 2021 at 09:59:24AM -0700, Darrick J. Wong wrote: > > 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)); Yes, that looks sensible.