diff options
Diffstat (limited to 'mm/filemap.h')
-rw-r--r-- | mm/filemap.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/filemap.h b/mm/filemap.h index c2bff04c84e..a1e10a232e9 100644 --- a/mm/filemap.h +++ b/mm/filemap.h @@ -87,7 +87,7 @@ filemap_set_next_iovec(const struct iovec **iovp, size_t *basep, size_t bytes) const struct iovec *iov = *iovp; size_t base = *basep; - do { + while (bytes) { int copy = min(bytes, iov->iov_len - base); bytes -= copy; @@ -96,7 +96,7 @@ filemap_set_next_iovec(const struct iovec **iovp, size_t *basep, size_t bytes) iov++; base = 0; } - } while (bytes); + } *iovp = iov; *basep = base; } |