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-Url: https://git.stricted.de/?a=commitdiff_plain;h=6d4c1a30b32a377083900f39c42bcacb633f99a1;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.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 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);