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: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c
index cb6a164..ae92795 100644
--- a/fs/orangefs/file.c
+++ b/fs/orangefs/file.c
@@ -350,9 +350,9 @@
break;
} /*end while */
+out:
if (total_count > 0)
ret = total_count;
-out:
if (ret > 0) {
if (type == ORANGEFS_IO_READ) {
file_accessed(file);