xfs: stop calling filemap_fdatawait inside ->fsync
authorChristoph Hellwig <hch@infradead.org>
Sat, 26 Sep 2009 19:55:04 +0000 (19:55 +0000)
committerAlex Elder <aelder@sgi.com>
Thu, 8 Oct 2009 17:02:48 +0000 (12:02 -0500)
Now that the VFS actually waits for the data I/O to complete before
calling into ->fsync we can stop doing it ourselves.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
fs/xfs/linux-2.6/xfs_file.c

index 988d8f87bc0f80b8a23d18397bcbac8f3116647e..6d65baf15a14f17aba87a879e6397cfedfcdd260 100644 (file)
@@ -176,14 +176,7 @@ xfs_file_fsync(
        struct dentry           *dentry,
        int                     datasync)
 {
-       struct inode            *inode = dentry->d_inode;
-       struct xfs_inode        *ip = XFS_I(inode);
-       int                     error;
-
-       /* capture size updates in I/O completion before writing the inode. */
-       error = filemap_fdatawait(inode->i_mapping);
-       if (error)
-               return error;
+       struct xfs_inode        *ip = XFS_I(dentry->d_inode);
 
        xfs_iflags_clear(ip, XFS_ITRUNCATED);
        return -xfs_fsync(ip);