mirror of https://gitee.com/openkylin/linux.git
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: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Alex Elder <aelder@sgi.com>
This commit is contained in:
parent
fc0063c447
commit
2b3ffd7eb7
|
@ -833,8 +833,8 @@ xfs_setattr_size(
|
||||||
* care about here.
|
* care about here.
|
||||||
*/
|
*/
|
||||||
if (ip->i_size != ip->i_d.di_size && iattr->ia_size > ip->i_d.di_size) {
|
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,
|
error = xfs_flush_pages(ip, ip->i_d.di_size, iattr->ia_size, 0,
|
||||||
XBF_ASYNC, FI_NONE);
|
FI_NONE);
|
||||||
if (error)
|
if (error)
|
||||||
goto out_unlock;
|
goto out_unlock;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue