diff --git a/lib/iov_iter.c b/lib/iov_iter.c index 60abc44385b795de7449b3810e9e294b7d2c48fc..cc001a542cb55326ba83e69805db3185d0c4301e 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;