OSDN Git Service

orangefs: fix do_readv_writev() handling of error halfway through
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 17 Feb 2016 01:15:43 +0000 (20:15 -0500)
committerMike Marshall <hubcap@omnibond.com>
Sat, 26 Mar 2016 02:30:54 +0000 (22:30 -0400)
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>
fs/orangefs/file.c

index cb6a164..ae92795 100644 (file)
@@ -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);