From: Al Viro Date: Sat, 29 Apr 2017 20:42:30 +0000 (-0400) Subject: fix a braino in ITER_PIPE iov_iter_revert() X-Git-Tag: MMI-PSA29.97-13-9~5765^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4fa55cefee1bbecadb4c9f47d40a92f65dc44351;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git fix a braino in ITER_PIPE iov_iter_revert() Fixes: 27c0e3748e41 Tested-by: Dave Jones Signed-off-by: Al Viro --- 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;