aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_vnodeops.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-03-23 18:28:51 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-23 18:28:51 -0500
commitdebf798b1ed82053689d900670eb27fb2f1b4bd3 (patch)
tree00684a077494864a990e3be82ad2796367f825f9 /fs/xfs/xfs_vnodeops.c
parentb0e6e962992b76580f4900b166a337bad7c1e81b (diff)
parent4d74f423c722b8cadfabe087369200013b217b67 (diff)
Merge git://oss.sgi.com:8090/oss/git/xfs-2.6
* git://oss.sgi.com:8090/oss/git/xfs-2.6: (71 commits) [XFS] Sync up one/two other minor changes missed in previous merges. [XFS] Reenable the noikeep (delete inode cluster space) option by default. [XFS] Check that a page has dirty buffers before finding it acceptable for [XFS] Fixup naming inconsistencies found by Pekka Enberg and one from Jan [XFS] Explain the race closed by the addition of vn_iowait() to the start [XFS] Fixing the error caused by the conflict between DIO Write's [XFS] Fixing KDB's xrwtrc command, also added the current process id into [XFS] Fix compiler warning from xfs_file_compat_invis_ioctl prototype. [XFS] remove bogus INT_GET for u8 variables in xfs_dir_leaf.c [XFS] endianess annotations for xfs_da_node_hdr_t [XFS] endianess annotations for xfs_da_node_entry_t [XFS] store xfs_attr_inactive_list_t in native endian [XFS] store xfs_attr_sf_sort in native endian [XFS] endianess annotations for xfs_attr_shortform_t [XFS] endianess annotations for xfs_attr_leaf_name_remote_t [XFS] endianess annotations for xfs_attr_leaf_name_local_t [XFS] endianess annotations for xfs_attr_leaf_entry_t [XFS] endianess annotations for xfs_attr_leaf_hdr_t [XFS] remove bogus INT_GET on u8 variables in xfs_dir2_block.c [XFS] endianess annotations for xfs_da_blkinfo_t ...
Diffstat (limited to 'fs/xfs/xfs_vnodeops.c')
-rw-r--r--fs/xfs/xfs_vnodeops.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
index eaab355f5a89..a478f42e63ff 100644
--- a/fs/xfs/xfs_vnodeops.c
+++ b/fs/xfs/xfs_vnodeops.c
@@ -615,6 +615,7 @@ xfs_setattr(
615 code = xfs_igrow_start(ip, vap->va_size, credp); 615 code = xfs_igrow_start(ip, vap->va_size, credp);
616 } 616 }
617 xfs_iunlock(ip, XFS_ILOCK_EXCL); 617 xfs_iunlock(ip, XFS_ILOCK_EXCL);
618 vn_iowait(vp); /* wait for the completion of any pending DIOs */
618 if (!code) 619 if (!code)
619 code = xfs_itruncate_data(ip, vap->va_size); 620 code = xfs_itruncate_data(ip, vap->va_size);
620 if (code) { 621 if (code) {
@@ -1556,7 +1557,7 @@ xfs_release(
1556 if ((error = xfs_inactive_free_eofblocks(mp, ip))) 1557 if ((error = xfs_inactive_free_eofblocks(mp, ip)))
1557 return error; 1558 return error;
1558 /* Update linux inode block count after free above */ 1559 /* Update linux inode block count after free above */
1559 LINVFS_GET_IP(vp)->i_blocks = XFS_FSB_TO_BB(mp, 1560 vn_to_inode(vp)->i_blocks = XFS_FSB_TO_BB(mp,
1560 ip->i_d.di_nblocks + ip->i_delayed_blks); 1561 ip->i_d.di_nblocks + ip->i_delayed_blks);
1561 } 1562 }
1562 } 1563 }
@@ -1637,7 +1638,7 @@ xfs_inactive(
1637 if ((error = xfs_inactive_free_eofblocks(mp, ip))) 1638 if ((error = xfs_inactive_free_eofblocks(mp, ip)))
1638 return VN_INACTIVE_CACHE; 1639 return VN_INACTIVE_CACHE;
1639 /* Update linux inode block count after free above */ 1640 /* Update linux inode block count after free above */
1640 LINVFS_GET_IP(vp)->i_blocks = XFS_FSB_TO_BB(mp, 1641 vn_to_inode(vp)->i_blocks = XFS_FSB_TO_BB(mp,
1641 ip->i_d.di_nblocks + ip->i_delayed_blks); 1642 ip->i_d.di_nblocks + ip->i_delayed_blks);
1642 } 1643 }
1643 goto out; 1644 goto out;
@@ -3186,7 +3187,7 @@ xfs_rmdir(
3186 3187
3187 /* Fall through to std_return with error = 0 or the errno 3188 /* Fall through to std_return with error = 0 or the errno
3188 * from xfs_trans_commit. */ 3189 * from xfs_trans_commit. */
3189std_return: 3190 std_return:
3190 if (DM_EVENT_ENABLED(dir_vp->v_vfsp, dp, DM_EVENT_POSTREMOVE)) { 3191 if (DM_EVENT_ENABLED(dir_vp->v_vfsp, dp, DM_EVENT_POSTREMOVE)) {
3191 (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTREMOVE, 3192 (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTREMOVE,
3192 dir_vp, DM_RIGHT_NULL, 3193 dir_vp, DM_RIGHT_NULL,
@@ -3196,12 +3197,12 @@ std_return:
3196 } 3197 }
3197 return error; 3198 return error;
3198 3199
3199error1: 3200 error1:
3200 xfs_bmap_cancel(&free_list); 3201 xfs_bmap_cancel(&free_list);
3201 cancel_flags |= XFS_TRANS_ABORT; 3202 cancel_flags |= XFS_TRANS_ABORT;
3202 /* FALLTHROUGH */ 3203 /* FALLTHROUGH */
3203 3204
3204error_return: 3205 error_return:
3205 xfs_trans_cancel(tp, cancel_flags); 3206 xfs_trans_cancel(tp, cancel_flags);
3206 goto std_return; 3207 goto std_return;
3207} 3208}
@@ -4310,8 +4311,10 @@ xfs_free_file_space(
4310 ASSERT(attr_flags & ATTR_NOLOCK ? attr_flags & ATTR_DMI : 1); 4311 ASSERT(attr_flags & ATTR_NOLOCK ? attr_flags & ATTR_DMI : 1);
4311 if (attr_flags & ATTR_NOLOCK) 4312 if (attr_flags & ATTR_NOLOCK)
4312 need_iolock = 0; 4313 need_iolock = 0;
4313 if (need_iolock) 4314 if (need_iolock) {
4314 xfs_ilock(ip, XFS_IOLOCK_EXCL); 4315 xfs_ilock(ip, XFS_IOLOCK_EXCL);
4316 vn_iowait(vp); /* wait for the completion of any pending DIOs */
4317 }
4315 4318
4316 rounding = MAX((__uint8_t)(1 << mp->m_sb.sb_blocklog), 4319 rounding = MAX((__uint8_t)(1 << mp->m_sb.sb_blocklog),
4317 (__uint8_t)NBPP); 4320 (__uint8_t)NBPP);