diff options
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_file.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_file.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c index 988d8f87bc0f..eff61e2732af 100644 --- a/fs/xfs/linux-2.6/xfs_file.c +++ b/fs/xfs/linux-2.6/xfs_file.c | |||
@@ -42,7 +42,7 @@ | |||
42 | 42 | ||
43 | #include <linux/dcache.h> | 43 | #include <linux/dcache.h> |
44 | 44 | ||
45 | static struct vm_operations_struct xfs_file_vm_ops; | 45 | static const struct vm_operations_struct xfs_file_vm_ops; |
46 | 46 | ||
47 | STATIC ssize_t | 47 | STATIC ssize_t |
48 | xfs_file_aio_read( | 48 | xfs_file_aio_read( |
@@ -176,14 +176,7 @@ xfs_file_fsync( | |||
176 | struct dentry *dentry, | 176 | struct dentry *dentry, |
177 | int datasync) | 177 | int datasync) |
178 | { | 178 | { |
179 | struct inode *inode = dentry->d_inode; | 179 | struct xfs_inode *ip = 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 | 180 | ||
188 | xfs_iflags_clear(ip, XFS_ITRUNCATED); | 181 | xfs_iflags_clear(ip, XFS_ITRUNCATED); |
189 | return -xfs_fsync(ip); | 182 | return -xfs_fsync(ip); |
@@ -280,7 +273,7 @@ const struct file_operations xfs_dir_file_operations = { | |||
280 | .fsync = xfs_file_fsync, | 273 | .fsync = xfs_file_fsync, |
281 | }; | 274 | }; |
282 | 275 | ||
283 | static struct vm_operations_struct xfs_file_vm_ops = { | 276 | static const struct vm_operations_struct xfs_file_vm_ops = { |
284 | .fault = filemap_fault, | 277 | .fault = filemap_fault, |
285 | .page_mkwrite = xfs_vm_page_mkwrite, | 278 | .page_mkwrite = xfs_vm_page_mkwrite, |
286 | }; | 279 | }; |