diff options
Diffstat (limited to 'fs/xfs/xfs_iomap.c')
-rw-r--r-- | fs/xfs/xfs_iomap.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c index cc6a7b5a9912..3f2b9f2a7b94 100644 --- a/fs/xfs/xfs_iomap.c +++ b/fs/xfs/xfs_iomap.c | |||
@@ -458,7 +458,7 @@ xfs_iomap_write_direct( | |||
458 | extsz = ip->i_d.di_extsize; | 458 | extsz = ip->i_d.di_extsize; |
459 | } | 459 | } |
460 | 460 | ||
461 | isize = ip->i_d.di_size; | 461 | isize = ip->i_size; |
462 | if (io->io_new_size > isize) | 462 | if (io->io_new_size > isize) |
463 | isize = io->io_new_size; | 463 | isize = io->io_new_size; |
464 | 464 | ||
@@ -524,7 +524,7 @@ xfs_iomap_write_direct( | |||
524 | xfs_trans_ihold(tp, ip); | 524 | xfs_trans_ihold(tp, ip); |
525 | 525 | ||
526 | bmapi_flag = XFS_BMAPI_WRITE; | 526 | bmapi_flag = XFS_BMAPI_WRITE; |
527 | if ((flags & BMAPI_DIRECT) && (offset < ip->i_d.di_size || extsz)) | 527 | if ((flags & BMAPI_DIRECT) && (offset < ip->i_size || extsz)) |
528 | bmapi_flag |= XFS_BMAPI_PREALLOC; | 528 | bmapi_flag |= XFS_BMAPI_PREALLOC; |
529 | 529 | ||
530 | /* | 530 | /* |
@@ -543,7 +543,7 @@ xfs_iomap_write_direct( | |||
543 | error = xfs_bmap_finish(&tp, &free_list, &committed); | 543 | error = xfs_bmap_finish(&tp, &free_list, &committed); |
544 | if (error) | 544 | if (error) |
545 | goto error0; | 545 | goto error0; |
546 | error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES, NULL); | 546 | error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES); |
547 | if (error) | 547 | if (error) |
548 | goto error_out; | 548 | goto error_out; |
549 | 549 | ||
@@ -676,7 +676,7 @@ xfs_iomap_write_delay( | |||
676 | offset_fsb = XFS_B_TO_FSBT(mp, offset); | 676 | offset_fsb = XFS_B_TO_FSBT(mp, offset); |
677 | 677 | ||
678 | retry: | 678 | retry: |
679 | isize = ip->i_d.di_size; | 679 | isize = ip->i_size; |
680 | if (io->io_new_size > isize) | 680 | if (io->io_new_size > isize) |
681 | isize = io->io_new_size; | 681 | isize = io->io_new_size; |
682 | 682 | ||
@@ -817,7 +817,7 @@ xfs_iomap_write_allocate( | |||
817 | * we dropped the ilock in the interim. | 817 | * we dropped the ilock in the interim. |
818 | */ | 818 | */ |
819 | 819 | ||
820 | end_fsb = XFS_B_TO_FSB(mp, ip->i_d.di_size); | 820 | end_fsb = XFS_B_TO_FSB(mp, ip->i_size); |
821 | xfs_bmap_last_offset(NULL, ip, &last_block, | 821 | xfs_bmap_last_offset(NULL, ip, &last_block, |
822 | XFS_DATA_FORK); | 822 | XFS_DATA_FORK); |
823 | last_block = XFS_FILEOFF_MAX(last_block, end_fsb); | 823 | last_block = XFS_FILEOFF_MAX(last_block, end_fsb); |
@@ -840,8 +840,7 @@ xfs_iomap_write_allocate( | |||
840 | if (error) | 840 | if (error) |
841 | goto trans_cancel; | 841 | goto trans_cancel; |
842 | 842 | ||
843 | error = xfs_trans_commit(tp, | 843 | error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES); |
844 | XFS_TRANS_RELEASE_LOG_RES, NULL); | ||
845 | if (error) | 844 | if (error) |
846 | goto error0; | 845 | goto error0; |
847 | 846 | ||
@@ -948,7 +947,7 @@ xfs_iomap_write_unwritten( | |||
948 | if (error) | 947 | if (error) |
949 | goto error_on_bmapi_transaction; | 948 | goto error_on_bmapi_transaction; |
950 | 949 | ||
951 | error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES, NULL); | 950 | error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES); |
952 | xfs_iunlock(ip, XFS_ILOCK_EXCL); | 951 | xfs_iunlock(ip, XFS_ILOCK_EXCL); |
953 | if (error) | 952 | if (error) |
954 | return XFS_ERROR(error); | 953 | return XFS_ERROR(error); |