Revert "[PATCH] generic_file_buffered_write(): handle zero-length iovec segments"
This reverts commit81b0c87133, which was a bugfix against6527c2bdf1("[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>
This commit is contained in:
committed by
Linus Torvalds
parent
41cb8ac025
commit
4b49643fbb
@@ -1895,12 +1895,6 @@ generic_file_buffered_write(struct kiocb *iocb, const struct iovec *iov,
|
||||
break;
|
||||
}
|
||||
|
||||
if (unlikely(bytes == 0)) {
|
||||
status = 0;
|
||||
copied = 0;
|
||||
goto zero_length_segment;
|
||||
}
|
||||
|
||||
status = a_ops->prepare_write(file, page, offset, offset+bytes);
|
||||
if (unlikely(status)) {
|
||||
loff_t isize = i_size_read(inode);
|
||||
@@ -1930,8 +1924,7 @@ generic_file_buffered_write(struct kiocb *iocb, const struct iovec *iov,
|
||||
page_cache_release(page);
|
||||
continue;
|
||||
}
|
||||
zero_length_segment:
|
||||
if (likely(copied >= 0)) {
|
||||
if (likely(copied > 0)) {
|
||||
if (!status)
|
||||
status = copied;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user