[PATCH 005/102] xfs: wait for I/O completion when writing out pages in xfs_setattr_size

Dave Chinner
2012-08-23T05:02:45Z

From: Christoph Hellwig <hch@infradead.org>

Upstream commit: 2b3ffd7eb7b4392e3657c5046b055ca9f1f7cf5e

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>
---
fs/xfs/xfs_vnodeops.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
index 59509ae..fbdb33b 100644
--- a/fs/xfs/xfs_vnodeops.c
+++ b/fs/xfs/xfs_vnodeops.c
@@ -246,7 +246,7 @@ xfs_setattr(
iattr->ia_size > ip->i_d.di_size) {
code = xfs_flush_pages(ip,
ip->i_d.di_size, iattr->ia_size,
- XBF_ASYNC, FI_NONE);
+ 0, FI_NONE);
if (code)
goto error_return;