Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23157
b: refs/heads/master
c: 9fa8046
h: refs/heads/master
i:
  23155: 0fe2c36
v: v3
  • Loading branch information
Yingping Lu authored and Nathan Scott committed Mar 22, 2006
1 parent 7665bd7 commit b1392a9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f1fdc848aab7fb95b32e058b7f06cc07912b3734
refs/heads/master: 9fa8046f50bcb88ab9183ee1f22de5adc42bf92a
3 changes: 3 additions & 0 deletions trunk/fs/xfs/xfs_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1420,6 +1420,9 @@ xfs_itruncate_start(

mp = ip->i_mount;
vp = XFS_ITOV(ip);

vn_iowait(vp); /* wait for the completion of any pending DIOs */

/*
* Call VOP_TOSS_PAGES() or VOP_FLUSHINVAL_PAGES() to get rid of pages and buffers
* overlapping the region being removed. We have to use
Expand Down
5 changes: 4 additions & 1 deletion trunk/fs/xfs/xfs_vnodeops.c
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,7 @@ xfs_setattr(
code = xfs_igrow_start(ip, vap->va_size, credp);
}
xfs_iunlock(ip, XFS_ILOCK_EXCL);
vn_iowait(vp); /* wait for the completion of any pending DIOs */
if (!code)
code = xfs_itruncate_data(ip, vap->va_size);
if (code) {
Expand Down Expand Up @@ -4310,8 +4311,10 @@ xfs_free_file_space(
ASSERT(attr_flags & ATTR_NOLOCK ? attr_flags & ATTR_DMI : 1);
if (attr_flags & ATTR_NOLOCK)
need_iolock = 0;
if (need_iolock)
if (need_iolock) {
xfs_ilock(ip, XFS_IOLOCK_EXCL);
vn_iowait(vp); /* wait for the completion of any pending DIOs */
}

rounding = MAX((__uint8_t)(1 << mp->m_sb.sb_blocklog),
(__uint8_t)NBPP);
Expand Down

0 comments on commit b1392a9

Please sign in to comment.