Commit 2b3ffd7e authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Alex Elder

xfs: wait for I/O completion when writing out pages in xfs_setattr_size

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: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
Signed-off-by: default avatarAlex Elder <aelder@sgi.com>
parent fc0063c4
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment