]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
xfs: Convert sync_page_range() to simple filemap_write_and_wait_range()
authorJan Kara <jack@suse.cz>
Tue, 18 Aug 2009 16:32:55 +0000 (18:32 +0200)
committerJan Kara <jack@suse.cz>
Mon, 14 Sep 2009 15:08:17 +0000 (17:08 +0200)
Christoph Hellwig says that it is enough for XFS to call
filemap_write_and_wait_range() instead of sync_page_range() because we do
all the metadata syncing when forcing the log.

CC: Felix Blyakher <felixb@sgi.com>
CC: xfs@oss.sgi.com
CC: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/xfs/linux-2.6/xfs_lrw.c

index 7078974a6eeed236f3cbc2d6420ba60aabbc0528..fde63a3c4ecc40cc30b813d3ae9a3a64ffbc80c0 100644 (file)
@@ -817,7 +817,8 @@ write_retry:
                xfs_iunlock(xip, iolock);
                if (need_i_mutex)
                        mutex_unlock(&inode->i_mutex);
-               error2 = sync_page_range(inode, mapping, pos, ret);
+               error2 = filemap_write_and_wait_range(mapping, pos,
+                                                     pos + ret - 1);
                if (!error)
                        error = error2;
                if (need_i_mutex)