diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-05-09 18:01:21 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-05-09 18:01:21 +0200 |
commit | 339fbf6796f8e74544091adbf511286768eaf93e (patch) | |
tree | 12840783d0eb70d1a7ecd13c3a7fab5b69b0a2b6 /mm/filemap.c | |
parent | proc: try to remove use of FOLL_FORCE entirely (diff) | |
parent | fix braino in generic_file_read_iter() (diff) | |
download | linux-339fbf6796f8e74544091adbf511286768eaf93e.tar.xz linux-339fbf6796f8e74544091adbf511286768eaf93e.zip |
Merge branch 'work.iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs fix from Al Viro:
"Braino fix for iov_iter_revert() misuse"
* 'work.iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
fix braino in generic_file_read_iter()
Diffstat (limited to 'mm/filemap.c')
-rw-r--r-- | mm/filemap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index b7b973b47d8d..6f1be573a5e6 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -2050,7 +2050,7 @@ generic_file_read_iter(struct kiocb *iocb, struct iov_iter *iter) iocb->ki_pos += retval; count -= retval; } - iov_iter_revert(iter, iov_iter_count(iter) - count); + iov_iter_revert(iter, count - iov_iter_count(iter)); /* * Btrfs can have a short DIO read if we encounter |