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 536979f..3f2a343 100644 --- a/mm/filemap.h +++ b/mm/filemap.h @@ -88,7 +88,7 @@ filemap_set_next_iovec(const struct iovec **iovp, size_t *basep, size_t bytes) const struct iovec *iov = *iovp; size_t base = *basep; - while (bytes) { + do { int copy = min(bytes, iov->iov_len - base); bytes -= copy; @@ -97,7 +97,7 @@ filemap_set_next_iovec(const struct iovec **iovp, size_t *basep, size_t bytes) iov++; base = 0; } - } + } while (bytes); *iovp = iov; *basep = base; } |