Module Name:    src
Committed By:   christos
Date:           Thu Apr  1 19:00:33 UTC 2021

Modified Files:
        src/sys/fs/puffs: puffs_vfsops.c

Log Message:
Put a copy of our existing data first in the non-error case (noticed by RVP).


To generate a diff of this commit:
cvs rdiff -u -r1.125 -r1.126 src/sys/fs/puffs/puffs_vfsops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/fs/puffs/puffs_vfsops.c
diff -u src/sys/fs/puffs/puffs_vfsops.c:1.125 src/sys/fs/puffs/puffs_vfsops.c:1.126
--- src/sys/fs/puffs/puffs_vfsops.c:1.125	Thu Feb 27 17:12:53 2020
+++ src/sys/fs/puffs/puffs_vfsops.c	Thu Apr  1 15:00:33 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs_vfsops.c,v 1.125 2020/02/27 22:12:53 ad Exp $	*/
+/*	$NetBSD: puffs_vfsops.c,v 1.126 2021/04/01 19:00:33 christos Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006  Antti Kantee.  All Rights Reserved.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: puffs_vfsops.c,v 1.125 2020/02/27 22:12:53 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: puffs_vfsops.c,v 1.126 2021/04/01 19:00:33 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -501,6 +501,9 @@ puffs_vfsop_statvfs(struct mount *mp, st
 	 *
 	 * XXX: cache the copy in non-error case
 	 */
+	if (!error) {
+		puffs_statvfs_to_statvfs(&statvfs_msg->pvfsr_sb, sbp);
+	}
 	copy_statvfs_info(sbp, mp);
 	if (!error) {
 		statvfs_to_puffs_statvfs(sbp, &statvfs_msg->pvfsr_sb);

Reply via email to