linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / mm / filemap.h
index efd0142..13793ba 100644 (file)
@@ -78,7 +78,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;
@@ -87,7 +87,7 @@ filemap_set_next_iovec(const struct iovec **iovp, size_t *basep, size_t bytes)
                        iov++;
                        base = 0;
                }
-       } while (bytes);
+       }
        *iovp = iov;
        *basep = base;
 }