diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c
index cb6a164b2718097596461281b8c852a3719befe5..ae92795ed9658d476a6ab229582086986fc2ad27 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);