diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-02-16 20:15:43 -0500 |
---|---|---|
committer | Mike Marshall <hubcap@omnibond.com> | 2016-03-25 22:30:54 -0400 |
commit | 6d4c1a30b32a377083900f39c42bcacb633f99a1 (patch) | |
tree | 0ee0925a24065a72acd9213b1a2f98ce67897e2f | |
parent | 524b1d3095159adeee0305508eefc836a197b681 (diff) |
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.c | 2 |
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, | |||
350 | break; | 350 | break; |
351 | } /*end while */ | 351 | } /*end while */ |
352 | 352 | ||
353 | out: | ||
353 | if (total_count > 0) | 354 | if (total_count > 0) |
354 | ret = total_count; | 355 | ret = total_count; |
355 | out: | ||
356 | if (ret > 0) { | 356 | if (ret > 0) { |
357 | if (type == ORANGEFS_IO_READ) { | 357 | if (type == ORANGEFS_IO_READ) { |
358 | file_accessed(file); | 358 | file_accessed(file); |