From 4b49643fbb3fa8bf4910f82be02d45e94e8972a4 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Tue, 16 Oct 2007 01:24:54 -0700 Subject: Revert "[PATCH] generic_file_buffered_write(): handle zero-length iovec segments" This reverts commit 81b0c8713385ce1b1b9058e916edcf9561ad76d6, which was a bugfix against 6527c2bdf1f833cc18e8f42bd97973d583e4aa83 ("[PATCH] generic_file_buffered_write(): deadlock on vectored write"), which we also revert. Signed-off-by: Andrew Morton Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- mm/filemap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mm/filemap.h') 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; } -- cgit v1.2.3-70-g09d2