|
@@ -4235,7 +4235,6 @@ xfs_bmapi_reserve_delalloc(
|
|
|
xfs_fileoff_t aoff,
|
|
|
xfs_filblks_t len,
|
|
|
struct xfs_bmbt_irec *got,
|
|
|
- struct xfs_bmbt_irec *prev,
|
|
|
xfs_extnum_t *lastx,
|
|
|
int eof)
|
|
|
{
|
|
@@ -4257,7 +4256,12 @@ xfs_bmapi_reserve_delalloc(
|
|
|
else
|
|
|
extsz = xfs_get_extsz_hint(ip);
|
|
|
if (extsz) {
|
|
|
- error = xfs_bmap_extsize_align(mp, got, prev, extsz, rt, eof,
|
|
|
+ struct xfs_bmbt_irec prev;
|
|
|
+
|
|
|
+ if (!xfs_iext_get_extent(ifp, *lastx - 1, &prev))
|
|
|
+ prev.br_startoff = NULLFILEOFF;
|
|
|
+
|
|
|
+ error = xfs_bmap_extsize_align(mp, got, &prev, extsz, rt, eof,
|
|
|
1, 0, &aoff, &alen);
|
|
|
ASSERT(!error);
|
|
|
}
|