On Sun, Jan 31, 2021 at 06:06:06PM -0800, Darrick J. Wong wrote: > @@ -1046,8 +1047,10 @@ xfs_trans_alloc_inode( > { > struct xfs_trans *tp; > struct xfs_mount *mp = ip->i_mount; > + bool retried = false; > int error; > > +retry: > error = xfs_trans_alloc(mp, resv, dblocks, > rblocks / mp->m_sb.sb_rextsize, > force ? XFS_TRANS_RESERVE : 0, &tp); > @@ -1065,6 +1068,13 @@ xfs_trans_alloc_inode( > } > > error = xfs_trans_reserve_quota_nblks(tp, ip, dblocks, rblocks, force); > + if (!retried && (error == -EDQUOT || error == -ENOSPC)) { Nit: writing this as if ((error == -EDQUOT || error == -ENOSPC) && !retried) { would make reading the line a little bit easier at least to me because it checks the variable assigned in the line above first. Otherwise this looks good: Reviewed-by: Christoph Hellwig <hch@xxxxxx>