On Tue, Jan 19, 2021 at 07:55:21AM +1100, Dave Chinner wrote: > > + &xfs_dio_write_ops, flags); > > + /* > > + * Retry unaligned IO with exclusive blocking semantics if the DIO > > + * layer rejected it for mapping or locking reasons. If we are doing > > + * nonblocking user IO, propagate the error. > > + */ > > + if (ret == -EAGAIN && !(iocb->ki_flags & IOCB_NOWAIT)) { > > + ASSERT(flags & IOMAP_DIO_UNALIGNED); > > + xfs_iunlock(ip, iolock); > > + goto retry_exclusive; > > + } > > + > > out_unlock: > > if (iolock) > > xfs_iunlock(ip, iolock); > > Do we ever get here without holding the iolock anymore? Yes, if xfs_ilock_iocb as called from xfs_file_write_checks fails.