diff options
Diffstat (limited to 'fs/sync.c')
-rw-r--r-- | fs/sync.c | 17 |
1 files changed, 0 insertions, 17 deletions
@@ -222,23 +222,6 @@ SYSCALL_DEFINE1(fdatasync, unsigned int, fd) | |||
222 | return do_fsync(fd, 1); | 222 | return do_fsync(fd, 1); |
223 | } | 223 | } |
224 | 224 | ||
225 | /** | ||
226 | * generic_write_sync - perform syncing after a write if file / inode is sync | ||
227 | * @file: file to which the write happened | ||
228 | * @pos: offset where the write started | ||
229 | * @count: length of the write | ||
230 | * | ||
231 | * This is just a simple wrapper about our general syncing function. | ||
232 | */ | ||
233 | int generic_write_sync(struct file *file, loff_t pos, loff_t count) | ||
234 | { | ||
235 | if (!(file->f_flags & O_DSYNC) && !IS_SYNC(file->f_mapping->host)) | ||
236 | return 0; | ||
237 | return vfs_fsync_range(file, pos, pos + count - 1, | ||
238 | (file->f_flags & __O_SYNC) ? 0 : 1); | ||
239 | } | ||
240 | EXPORT_SYMBOL(generic_write_sync); | ||
241 | |||
242 | /* | 225 | /* |
243 | * sys_sync_file_range() permits finely controlled syncing over a segment of | 226 | * sys_sync_file_range() permits finely controlled syncing over a segment of |
244 | * a file in the range offset .. (offset+nbytes-1) inclusive. If nbytes is | 227 | * a file in the range offset .. (offset+nbytes-1) inclusive. If nbytes is |