From: Al Viro Date: Wed, 17 Feb 2016 01:15:43 +0000 (-0500) Subject: orangefs: fix do_readv_writev() handling of error halfway through X-Git-Tag: v4.14-rc1~3520^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6d4c1a30b32a377083900f39c42bcacb633f99a1;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Mike Marshall --- 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 @@ 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);