Skip to content

Commit

Permalink
xfs: stop calling filemap_fdatawait inside ->fsync
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christoph Hellwig authored and Alex Elder committed Oct 8, 2009
1 parent 8e69ce1 commit d080070
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions fs/xfs/linux-2.6/xfs_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d080070

Please sign in to comment.