diff options
author | Andrew Morton <akpm@osdl.org> | 2007-10-16 04:24:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 12:42:54 -0400 |
commit | 4b49643fbb3fa8bf4910f82be02d45e94e8972a4 (patch) | |
tree | ee3bc7881a1e0b71fa093254bb725ad467d8ef72 /mm/filemap.c | |
parent | 41cb8ac025dbbf6782eae10d231e7e2336ad3724 (diff) |
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 <akpm@osdl.org>
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/filemap.c')
-rw-r--r-- | mm/filemap.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index c504db18ac26..caaaa7adfdf9 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -1895,12 +1895,6 @@ generic_file_buffered_write(struct kiocb *iocb, const struct iovec *iov, | |||
1895 | break; | 1895 | break; |
1896 | } | 1896 | } |
1897 | 1897 | ||
1898 | if (unlikely(bytes == 0)) { | ||
1899 | status = 0; | ||
1900 | copied = 0; | ||
1901 | goto zero_length_segment; | ||
1902 | } | ||
1903 | |||
1904 | status = a_ops->prepare_write(file, page, offset, offset+bytes); | 1898 | status = a_ops->prepare_write(file, page, offset, offset+bytes); |
1905 | if (unlikely(status)) { | 1899 | if (unlikely(status)) { |
1906 | loff_t isize = i_size_read(inode); | 1900 | loff_t isize = i_size_read(inode); |
@@ -1930,8 +1924,7 @@ generic_file_buffered_write(struct kiocb *iocb, const struct iovec *iov, | |||
1930 | page_cache_release(page); | 1924 | page_cache_release(page); |
1931 | continue; | 1925 | continue; |
1932 | } | 1926 | } |
1933 | zero_length_segment: | 1927 | if (likely(copied > 0)) { |
1934 | if (likely(copied >= 0)) { | ||
1935 | if (!status) | 1928 | if (!status) |
1936 | status = copied; | 1929 | status = copied; |
1937 | 1930 | ||