summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-02-17 02:15:43 +0100
committerMike Marshall <hubcap@omnibond.com>2016-03-26 03:30:54 +0100
commit6d4c1a30b32a377083900f39c42bcacb633f99a1 (patch)
tree0ee0925a24065a72acd9213b1a2f98ce67897e2f
parentorangefs: have ->kill_sb() evict the VFS side of things first (diff)
downloadlinux-6d4c1a30b32a377083900f39c42bcacb633f99a1.tar.xz
linux-6d4c1a30b32a377083900f39c42bcacb633f99a1.zip
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>
-rw-r--r--fs/orangefs/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c
index cb6a164b2718..ae92795ed965 100644
--- a/fs/orangefs/file.c
+++ b/fs/orangefs/file.c
@@ -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);