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 /mm | |
parent | 9c1db7798141e2658e4b5bb170128dfdc3270ff4 (diff) | |
parent | c9efe51165fa0aff57be54e3cb0201ac87f68980 (diff) |
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 'mm')
-rw-r--r-- | mm/filemap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index d56d3c145b9..7a13f6ac542 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -2553,8 +2553,8 @@ ssize_t generic_file_aio_write(struct kiocb *iocb, const struct iovec *iov, if (ret > 0) { ssize_t err; - err = generic_write_sync(file, pos, ret); - if (err < 0 && ret > 0) + err = generic_write_sync(file, iocb->ki_pos - ret, ret); + if (err < 0) ret = err; } return ret; |