diff options
| author | Alex Elder <aelder@sgi.com> | 2009-09-15 22:37:47 -0400 |
|---|---|---|
| committer | Alex Elder <aelder@sgi.com> | 2009-09-15 22:37:47 -0400 |
| commit | fdec29c5fcd2705d61c1d14a1d4c74be03e9627c (patch) | |
| tree | bcf5d4dd46b4945f3b4bec6b763ff9a9484e4e59 /fs/xfs/linux-2.6/xfs_file.c | |
| parent | 0cb583fd2862f19ea88b02eb307d11c09e51e2f8 (diff) | |
| parent | 9ef96da6ec5e1b4cf7eb8e30852cd88ec7d5fdc0 (diff) | |
Merge branch 'master' of git://oss.sgi.com/xfs/xfs into for-linus
Conflicts:
fs/xfs/linux-2.6/xfs_lrw.c
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_file.c')
| -rw-r--r-- | fs/xfs/linux-2.6/xfs_file.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c index 0542fd507649..988d8f87bc0f 100644 --- a/fs/xfs/linux-2.6/xfs_file.c +++ b/fs/xfs/linux-2.6/xfs_file.c | |||
| @@ -172,12 +172,21 @@ xfs_file_release( | |||
| 172 | */ | 172 | */ |
| 173 | STATIC int | 173 | STATIC int |
| 174 | xfs_file_fsync( | 174 | xfs_file_fsync( |
| 175 | struct file *filp, | 175 | struct file *file, |
| 176 | struct dentry *dentry, | 176 | struct dentry *dentry, |
| 177 | int datasync) | 177 | int datasync) |
| 178 | { | 178 | { |
| 179 | xfs_iflags_clear(XFS_I(dentry->d_inode), XFS_ITRUNCATED); | 179 | struct inode *inode = dentry->d_inode; |
| 180 | return -xfs_fsync(XFS_I(dentry->d_inode)); | 180 | struct xfs_inode *ip = XFS_I(inode); |
| 181 | int error; | ||
| 182 | |||
| 183 | /* capture size updates in I/O completion before writing the inode. */ | ||
| 184 | error = filemap_fdatawait(inode->i_mapping); | ||
| 185 | if (error) | ||
| 186 | return error; | ||
| 187 | |||
| 188 | xfs_iflags_clear(ip, XFS_ITRUNCATED); | ||
| 189 | return -xfs_fsync(ip); | ||
| 181 | } | 190 | } |
| 182 | 191 | ||
| 183 | STATIC int | 192 | STATIC int |
