提交 6d4c1a30 编写于 作者: A Al Viro 提交者: Mike Marshall

orangefs: fix do_readv_writev() handling of error halfway through

Error should only be returned if nothing had been read/written.
Otherwise we need to report a short read/write instead.
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: NMike Marshall <hubcap@omnibond.com>
上级 524b1d30
......@@ -350,9 +350,9 @@ static ssize_t do_readv_writev(enum ORANGEFS_io_type type, struct file *file,
break;
} /*end while */
out:
if (total_count > 0)
ret = total_count;
out:
if (ret > 0) {
if (type == ORANGEFS_IO_READ) {
file_accessed(file);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册