Commit 6d4c1a30 authored by Al Viro's avatar Al Viro Committed by 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: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarMike Marshall <hubcap@omnibond.com>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment