On Fri, Aug 09, 2024 at 08:36:33AM +1000, Dave Chinner wrote: > > diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c > > index 60424e64230743..30b553ac8f56bb 100644 > > --- a/fs/xfs/xfs_file.c > > +++ b/fs/xfs/xfs_file.c > > @@ -1204,15 +1204,21 @@ xfs_file_release( > > * exposed to that problem. > > */ > > if (xfs_iflags_test_and_clear(ip, XFS_ITRUNCATED)) { > > - xfs_iflags_clear(ip, XFS_IDIRTY_RELEASE); > > + xfs_iflags_clear(ip, XFS_EOFBLOCKS_RELEASED); > > if (ip->i_delayed_blks > 0) > > filemap_flush(inode->i_mapping); > > } > > This should probably be open coded to minimise lock cycles and lock > contention on the flags lock when concurrent open/sync write/close > cycles are run on the file (as recently reported by Mateusz). i.e: Let's do that as a separate patch on top of the series, as that is unrelated.