Skip to content

Commit

Permalink
xfs: wait for I/O completion when writing out pages in xfs_setattr_size
Browse files Browse the repository at this point in the history
The current code relies on the xfs_ioend_wait call later on to make sure
all I/O actually has completed.  The xfs_ioend_wait call will go away soon,
so prepare for that by using the waiting filemap function.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
  • Loading branch information
Christoph Hellwig authored and Alex Elder committed Oct 12, 2011
1 parent fc0063c commit 2b3ffd7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/xfs/xfs_iops.c
Original file line number Diff line number Diff line change
Expand Up @@ -833,8 +833,8 @@ xfs_setattr_size(
* care about here.
*/
if (ip->i_size != ip->i_d.di_size && iattr->ia_size > ip->i_d.di_size) {
error = xfs_flush_pages(ip, ip->i_d.di_size, iattr->ia_size,
XBF_ASYNC, FI_NONE);
error = xfs_flush_pages(ip, ip->i_d.di_size, iattr->ia_size, 0,
FI_NONE);
if (error)
goto out_unlock;
}
Expand Down

0 comments on commit 2b3ffd7

Please sign in to comment.