Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/nfs Revert the hack from the last commit now that VOP_UN...



details:   https://anonhg.NetBSD.org/src/rev/dfac097f225d
branches:  trunk
changeset: 362469:dfac097f225d
user:      hannken <hannken%NetBSD.org@localhost>
date:      Mon Feb 28 08:45:36 2022 +0000

description:
Revert the hack from the last commit now that VOP_UNLOCK()
no longer may hold v_interlock or vmobjlock.

diffstat:

 sys/nfs/nfs_clntsubs.c |  15 ++-------------
 1 files changed, 2 insertions(+), 13 deletions(-)

diffs (39 lines):

diff -r 58967030b523 -r dfac097f225d sys/nfs/nfs_clntsubs.c
--- a/sys/nfs/nfs_clntsubs.c    Mon Feb 28 08:44:04 2022 +0000
+++ b/sys/nfs/nfs_clntsubs.c    Mon Feb 28 08:45:36 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nfs_clntsubs.c,v 1.5 2022/01/14 19:19:34 christos Exp $        */
+/*     $NetBSD: nfs_clntsubs.c,v 1.6 2022/02/28 08:45:36 hannken Exp $ */
 
 /*
  * Copyright (c) 1989, 1993
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_clntsubs.c,v 1.5 2022/01/14 19:19:34 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_clntsubs.c,v 1.6 2022/02/28 08:45:36 hannken Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_nfs.h"
@@ -360,20 +360,9 @@
                np->n_flag &= ~NTRUNCDELAYED;
                genfs_node_wrlock(vp);
                rw_enter(vp->v_uobj.vmobjlock, RW_WRITER);
-
-               /*
-                * This is disgusting but we can be called from VOP_UNLOCK
-                * where the interlock is sometimes held, and we want to
-                * make sure that it is unlocked when we call VOP_PUTPAGES
-                * and uvm_vnp_setsize.
-                */
-               int got = mutex_tryenter(vp->v_interlock);
-               mutex_exit(vp->v_interlock);
                (void)VOP_PUTPAGES(vp, 0,
                    0, PGO_SYNCIO | PGO_CLEANIT | PGO_FREE | PGO_ALLPAGES);
                uvm_vnp_setsize(vp, np->n_size);
-               if (!got)
-                       mutex_enter(vp->v_interlock);
                genfs_node_unlock(vp);
        }
 }



Home | Main Index | Thread Index | Old Index