diff options
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r-- | fs/btrfs/file.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 4599113ed72e..06550affbd27 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c | |||
@@ -1023,9 +1023,8 @@ static ssize_t btrfs_file_write(struct file *file, const char __user *buf, | |||
1023 | } | 1023 | } |
1024 | 1024 | ||
1025 | if (will_write) { | 1025 | if (will_write) { |
1026 | btrfs_fdatawrite_range(inode->i_mapping, pos, | 1026 | filemap_fdatawrite_range(inode->i_mapping, pos, |
1027 | pos + write_bytes - 1, | 1027 | pos + write_bytes - 1); |
1028 | WB_SYNC_ALL); | ||
1029 | } else { | 1028 | } else { |
1030 | balance_dirty_pages_ratelimited_nr(inode->i_mapping, | 1029 | balance_dirty_pages_ratelimited_nr(inode->i_mapping, |
1031 | num_pages); | 1030 | num_pages); |
@@ -1214,7 +1213,7 @@ out: | |||
1214 | return ret > 0 ? EIO : ret; | 1213 | return ret > 0 ? EIO : ret; |
1215 | } | 1214 | } |
1216 | 1215 | ||
1217 | static struct vm_operations_struct btrfs_file_vm_ops = { | 1216 | static const struct vm_operations_struct btrfs_file_vm_ops = { |
1218 | .fault = filemap_fault, | 1217 | .fault = filemap_fault, |
1219 | .page_mkwrite = btrfs_page_mkwrite, | 1218 | .page_mkwrite = btrfs_page_mkwrite, |
1220 | }; | 1219 | }; |
@@ -1226,7 +1225,7 @@ static int btrfs_file_mmap(struct file *filp, struct vm_area_struct *vma) | |||
1226 | return 0; | 1225 | return 0; |
1227 | } | 1226 | } |
1228 | 1227 | ||
1229 | struct file_operations btrfs_file_operations = { | 1228 | const struct file_operations btrfs_file_operations = { |
1230 | .llseek = generic_file_llseek, | 1229 | .llseek = generic_file_llseek, |
1231 | .read = do_sync_read, | 1230 | .read = do_sync_read, |
1232 | .aio_read = generic_file_aio_read, | 1231 | .aio_read = generic_file_aio_read, |