Module Name:    src
Committed By:   hannken
Date:           Fri May  1 08:43:00 UTC 2020

Modified Files:
        src/sys/nfs: nfs_node.c

Log Message:
Resolve delayed truncation from nfs_inactive() too.

Should prevent "locking against self" from nfs_unlock().


To generate a diff of this commit:
cvs rdiff -u -r1.125 -r1.126 src/sys/nfs/nfs_node.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/nfs/nfs_node.c
diff -u src/sys/nfs/nfs_node.c:1.125 src/sys/nfs/nfs_node.c:1.126
--- src/sys/nfs/nfs_node.c:1.125	Mon Feb 24 20:11:45 2020
+++ src/sys/nfs/nfs_node.c	Fri May  1 08:43:00 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_node.c,v 1.125 2020/02/24 20:11:45 ad Exp $	*/
+/*	$NetBSD: nfs_node.c,v 1.126 2020/05/01 08:43:00 hannken Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_node.c,v 1.125 2020/02/24 20:11:45 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_node.c,v 1.126 2020/05/01 08:43:00 hannken Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_nfs.h"
@@ -186,6 +186,9 @@ nfs_inactive(void *v)
 	struct sillyrename *sp;
 	struct vnode *vp = ap->a_vp;
 
+	/* If we have a delayed truncation, do it now. */
+	nfs_delayedtruncate(vp);
+
 	np = VTONFS(vp);
 	if (vp->v_type != VDIR) {
 		sp = np->n_sillyrename;

Reply via email to