]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
fix a braino in ITER_PIPE iov_iter_revert()
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 29 Apr 2017 20:42:30 +0000 (16:42 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 29 Apr 2017 20:42:30 +0000 (16:42 -0400)
Fixes: 27c0e3748e41
Tested-by: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
lib/iov_iter.c

index 60abc44385b795de7449b3810e9e294b7d2c48fc..cc001a542cb55326ba83e69805db3185d0c4301e 100644 (file)
@@ -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;