diff options
| author | Alex Elder <aelder@sgi.com> | 2009-09-15 22:37:47 -0400 | 
|---|---|---|
| committer | Alex Elder <aelder@sgi.com> | 2009-09-15 22:37:47 -0400 | 
| commit | fdec29c5fcd2705d61c1d14a1d4c74be03e9627c (patch) | |
| tree | bcf5d4dd46b4945f3b4bec6b763ff9a9484e4e59 /fs/xfs/xfs_vnodeops.c | |
| parent | 0cb583fd2862f19ea88b02eb307d11c09e51e2f8 (diff) | |
| parent | 9ef96da6ec5e1b4cf7eb8e30852cd88ec7d5fdc0 (diff) | |
Merge branch 'master' of git://oss.sgi.com/xfs/xfs into for-linus
Conflicts:
	fs/xfs/linux-2.6/xfs_lrw.c
Diffstat (limited to 'fs/xfs/xfs_vnodeops.c')
| -rw-r--r-- | fs/xfs/xfs_vnodeops.c | 17 | 
1 files changed, 6 insertions, 11 deletions
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index 492d75bae2bf..a434f287962d 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c  | |||
| @@ -611,7 +611,7 @@ xfs_fsync( | |||
| 611 | xfs_inode_t *ip) | 611 | xfs_inode_t *ip) | 
| 612 | { | 612 | { | 
| 613 | xfs_trans_t *tp; | 613 | xfs_trans_t *tp; | 
| 614 | int error; | 614 | int error = 0; | 
| 615 | int log_flushed = 0, changed = 1; | 615 | int log_flushed = 0, changed = 1; | 
| 616 | 616 | ||
| 617 | xfs_itrace_entry(ip); | 617 | xfs_itrace_entry(ip); | 
| @@ -619,14 +619,9 @@ xfs_fsync( | |||
| 619 | if (XFS_FORCED_SHUTDOWN(ip->i_mount)) | 619 | if (XFS_FORCED_SHUTDOWN(ip->i_mount)) | 
| 620 | return XFS_ERROR(EIO); | 620 | return XFS_ERROR(EIO); | 
| 621 | 621 | ||
| 622 | /* capture size updates in I/O completion before writing the inode. */ | ||
| 623 | error = xfs_wait_on_pages(ip, 0, -1); | ||
| 624 | if (error) | ||
| 625 | return XFS_ERROR(error); | ||
| 626 | |||
| 627 | /* | 622 | /* | 
| 628 | * We always need to make sure that the required inode state is safe on | 623 | * We always need to make sure that the required inode state is safe on | 
| 629 | * disk. The vnode might be clean but we still might need to force the | 624 | * disk. The inode might be clean but we still might need to force the | 
| 630 | * log because of committed transactions that haven't hit the disk yet. | 625 | * log because of committed transactions that haven't hit the disk yet. | 
| 631 | * Likewise, there could be unflushed non-transactional changes to the | 626 | * Likewise, there could be unflushed non-transactional changes to the | 
| 632 | * inode core that have to go to disk and this requires us to issue | 627 | * inode core that have to go to disk and this requires us to issue | 
| @@ -638,7 +633,7 @@ xfs_fsync( | |||
| 638 | */ | 633 | */ | 
| 639 | xfs_ilock(ip, XFS_ILOCK_SHARED); | 634 | xfs_ilock(ip, XFS_ILOCK_SHARED); | 
| 640 | 635 | ||
| 641 | if (!(ip->i_update_size || ip->i_update_core)) { | 636 | if (!ip->i_update_core) { | 
| 642 | /* | 637 | /* | 
| 643 | * Timestamps/size haven't changed since last inode flush or | 638 | * Timestamps/size haven't changed since last inode flush or | 
| 644 | * inode transaction commit. That means either nothing got | 639 | * inode transaction commit. That means either nothing got | 
| @@ -718,7 +713,7 @@ xfs_fsync( | |||
| 718 | * when the link count isn't zero and by xfs_dm_punch_hole() when | 713 | * when the link count isn't zero and by xfs_dm_punch_hole() when | 
| 719 | * punching a hole to EOF. | 714 | * punching a hole to EOF. | 
| 720 | */ | 715 | */ | 
| 721 | int | 716 | STATIC int | 
| 722 | xfs_free_eofblocks( | 717 | xfs_free_eofblocks( | 
| 723 | xfs_mount_t *mp, | 718 | xfs_mount_t *mp, | 
| 724 | xfs_inode_t *ip, | 719 | xfs_inode_t *ip, | 
| @@ -1476,8 +1471,8 @@ xfs_create( | |||
| 1476 | if (error == ENOSPC) { | 1471 | if (error == ENOSPC) { | 
| 1477 | /* flush outstanding delalloc blocks and retry */ | 1472 | /* flush outstanding delalloc blocks and retry */ | 
| 1478 | xfs_flush_inodes(dp); | 1473 | xfs_flush_inodes(dp); | 
| 1479 | error = xfs_trans_reserve(tp, resblks, XFS_CREATE_LOG_RES(mp), 0, | 1474 | error = xfs_trans_reserve(tp, resblks, log_res, 0, | 
| 1480 | XFS_TRANS_PERM_LOG_RES, XFS_CREATE_LOG_COUNT); | 1475 | XFS_TRANS_PERM_LOG_RES, log_count); | 
| 1481 | } | 1476 | } | 
| 1482 | if (error == ENOSPC) { | 1477 | if (error == ENOSPC) { | 
| 1483 | /* No space at all so try a "no-allocation" reservation */ | 1478 | /* No space at all so try a "no-allocation" reservation */ | 
