diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c index 72c981e3dc92..6216c31aa3cc 100644 --- a/fs/xfs/xfs_iomap.c +++ b/fs/xfs/xfs_iomap.c @@ -1162,6 +1162,9 @@ xfs_buffered_write_iomap_begin( if (error) goto out_unlock; + /* Get extent info that may updated by xfs_bmapi_reserve_delalloc() */ + xfs_iext_lookup_extent(ip, &ip->i_df, offset_fsb, &icur, &imap); + /* * Flag newly allocated delalloc blocks with IOMAP_F_NEW so we punch * them out if the write happens to fail.