diff options
Diffstat (limited to 'fs/xfs/xfs_file.c')
-rw-r--r-- | fs/xfs/xfs_file.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index 06fe97e56e48..558543c146b3 100644 --- a/fs/xfs/xfs_file.c +++ b/fs/xfs/xfs_file.c | |||
@@ -509,11 +509,9 @@ xfs_zero_last_block( | |||
509 | 509 | ||
510 | last_fsb = XFS_B_TO_FSBT(mp, isize); | 510 | last_fsb = XFS_B_TO_FSBT(mp, isize); |
511 | nimaps = 1; | 511 | nimaps = 1; |
512 | error = xfs_bmapi(NULL, ip, last_fsb, 1, 0, NULL, 0, &imap, | 512 | error = xfs_bmapi_read(ip, last_fsb, 1, &imap, &nimaps, 0); |
513 | &nimaps, NULL); | 513 | if (error) |
514 | if (error) { | ||
515 | return error; | 514 | return error; |
516 | } | ||
517 | ASSERT(nimaps > 0); | 515 | ASSERT(nimaps > 0); |
518 | /* | 516 | /* |
519 | * If the block underlying isize is just a hole, then there | 517 | * If the block underlying isize is just a hole, then there |
@@ -604,8 +602,8 @@ xfs_zero_eof( | |||
604 | while (start_zero_fsb <= end_zero_fsb) { | 602 | while (start_zero_fsb <= end_zero_fsb) { |
605 | nimaps = 1; | 603 | nimaps = 1; |
606 | zero_count_fsb = end_zero_fsb - start_zero_fsb + 1; | 604 | zero_count_fsb = end_zero_fsb - start_zero_fsb + 1; |
607 | error = xfs_bmapi(NULL, ip, start_zero_fsb, zero_count_fsb, | 605 | error = xfs_bmapi_read(ip, start_zero_fsb, zero_count_fsb, |
608 | 0, NULL, 0, &imap, &nimaps, NULL); | 606 | &imap, &nimaps, 0); |
609 | if (error) { | 607 | if (error) { |
610 | ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL|XFS_IOLOCK_EXCL)); | 608 | ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL|XFS_IOLOCK_EXCL)); |
611 | return error; | 609 | return error; |