diff options
Diffstat (limited to 'fs/sync.c')
-rw-r--r-- | fs/sync.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -295,10 +295,11 @@ SYSCALL_DEFINE1(fdatasync, unsigned int, fd) | |||
295 | */ | 295 | */ |
296 | int generic_write_sync(struct file *file, loff_t pos, loff_t count) | 296 | int generic_write_sync(struct file *file, loff_t pos, loff_t count) |
297 | { | 297 | { |
298 | if (!(file->f_flags & O_SYNC) && !IS_SYNC(file->f_mapping->host)) | 298 | if (!(file->f_flags & O_DSYNC) && !IS_SYNC(file->f_mapping->host)) |
299 | return 0; | 299 | return 0; |
300 | return vfs_fsync_range(file, file->f_path.dentry, pos, | 300 | return vfs_fsync_range(file, file->f_path.dentry, pos, |
301 | pos + count - 1, 1); | 301 | pos + count - 1, |
302 | (file->f_flags & __O_SYNC) ? 0 : 1); | ||
302 | } | 303 | } |
303 | EXPORT_SYMBOL(generic_write_sync); | 304 | EXPORT_SYMBOL(generic_write_sync); |
304 | 305 | ||