Эх сурвалжийг харах

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>
Al Viro 9 жил өмнө
parent
commit
6d4c1a30b3
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      fs/orangefs/file.c

+ 1 - 1
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);