summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2017-04-29 16:42:30 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2017-04-29 16:42:30 -0400
commit4fa55cefee1bbecadb4c9f47d40a92f65dc44351 (patch)
tree18c8fc96fdc8387ed95b7bf4f3110381196a4b0d /lib
parent1741937d475d91ed95abb37f07e8571e23b9a7fe (diff)
fix a braino in ITER_PIPE iov_iter_revert()
Fixes: 27c0e3748e41 Tested-by: Dave Jones <davej@codemonkey.org.uk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'lib')
-rw-r--r--lib/iov_iter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/iov_iter.c b/lib/iov_iter.c
index 60abc44385b7..cc001a542cb5 100644
--- a/lib/iov_iter.c
+++ b/lib/iov_iter.c
@@ -798,7 +798,7 @@ void iov_iter_revert(struct iov_iter *i, size_t unroll)
while (1) {
size_t n = off - pipe->bufs[idx].offset;
if (unroll < n) {
- off -= (n - unroll);
+ off -= unroll;
break;
}
unroll -= n;