Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6d4c1a30 authored by Al Viro's avatar Al Viro Committed by Mike Marshall
Browse files

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: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarMike Marshall <hubcap@omnibond.com>
parent 524b1d30
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -350,9 +350,9 @@ static ssize_t do_readv_writev(enum ORANGEFS_io_type type, struct file *file,
			break;
			break;
	} /*end while */
	} /*end while */


out:
	if (total_count > 0)
	if (total_count > 0)
		ret = total_count;
		ret = total_count;
out:
	if (ret > 0) {
	if (ret > 0) {
		if (type == ORANGEFS_IO_READ) {
		if (type == ORANGEFS_IO_READ) {
			file_accessed(file);
			file_accessed(file);