|
@@ -128,7 +128,6 @@ xfs_iomap_write_direct(
|
|
|
xfs_fsblock_t firstfsb;
|
|
|
xfs_extlen_t extsz, temp;
|
|
|
int nimaps;
|
|
|
- int bmapi_flag;
|
|
|
int quota_flag;
|
|
|
int rt;
|
|
|
xfs_trans_t *tp;
|
|
@@ -200,18 +199,15 @@ xfs_iomap_write_direct(
|
|
|
|
|
|
xfs_trans_ijoin(tp, ip, 0);
|
|
|
|
|
|
- bmapi_flag = 0;
|
|
|
- if (offset < XFS_ISIZE(ip) || extsz)
|
|
|
- bmapi_flag |= XFS_BMAPI_PREALLOC;
|
|
|
-
|
|
|
/*
|
|
|
* From this point onwards we overwrite the imap pointer that the
|
|
|
* caller gave to us.
|
|
|
*/
|
|
|
xfs_bmap_init(&free_list, &firstfsb);
|
|
|
nimaps = 1;
|
|
|
- error = xfs_bmapi_write(tp, ip, offset_fsb, count_fsb, bmapi_flag,
|
|
|
- &firstfsb, 0, imap, &nimaps, &free_list);
|
|
|
+ error = xfs_bmapi_write(tp, ip, offset_fsb, count_fsb,
|
|
|
+ XFS_BMAPI_PREALLOC, &firstfsb, 0,
|
|
|
+ imap, &nimaps, &free_list);
|
|
|
if (error)
|
|
|
goto out_bmap_cancel;
|
|
|
|