diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-02-09 18:12:07 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-02-09 18:12:07 -0800 |
commit | f94aa7c7f1fc474be776e4bf88088d5a007d3575 (patch) | |
tree | ba607798fb9e9136d267353b9b5c1b4dd50f4819 /fs/sync.c | |
parent | 9c1db7798141e2658e4b5bb170128dfdc3270ff4 (diff) | |
parent | c9efe51165fa0aff57be54e3cb0201ac87f68980 (diff) | |
download | op-kernel-dev-f94aa7c7f1fc474be776e4bf88088d5a007d3575.zip op-kernel-dev-f94aa7c7f1fc474be776e4bf88088d5a007d3575.tar.gz |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs fixes from Al Viro:
"A couple of fixes, both -stable fodder. The O_SYNC bug is fairly
old..."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
fix a kmap leak in virtio_console
fix O_SYNC|O_APPEND syncing the wrong range on write()
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) return do_fsync(fd, 1); } -/** - * generic_write_sync - perform syncing after a write if file / inode is sync - * @file: file to which the write happened - * @pos: offset where the write started - * @count: length of the write - * - * This is just a simple wrapper about our general syncing function. - */ -int generic_write_sync(struct file *file, loff_t pos, loff_t count) -{ - if (!(file->f_flags & O_DSYNC) && !IS_SYNC(file->f_mapping->host)) - return 0; - return vfs_fsync_range(file, pos, pos + count - 1, - (file->f_flags & __O_SYNC) ? 0 : 1); -} -EXPORT_SYMBOL(generic_write_sync); - /* * sys_sync_file_range() permits finely controlled syncing over a segment of * a file in the range offset .. (offset+nbytes-1) inclusive. If nbytes is |