cvs commit: src/sys/vfs/nfs nfs_serv.c

Matthew Dillon dillon at apollo.backplane.com
Fri Mar 3 09:59:05 PST 2006


:I tried this patch and I can touch a file on the exported drive (which 
:didn't work before). But now it panics when I try to rm that file again.
:
:"panic: lockmgr: locking against myself"
:
:Sascha

    It's the same issue.  Try this patch.

					-Matt
					Matthew Dillon 
					<dillon at xxxxxxxxxxxxx>

Index: nfs_serv.c
===================================================================
RCS file: /cvs/src/sys/vfs/nfs/nfs_serv.c,v
retrieving revision 1.26
diff -u -r1.26 nfs_serv.c
--- nfs_serv.c	1 Mar 2006 00:21:58 -0000	1.26
+++ nfs_serv.c	3 Mar 2006 17:53:54 -0000
@@ -2057,6 +2057,17 @@
 		if (!error) {
 			nqsrv_getl(dvp, ND_WRITE);
 			nqsrv_getl(vp, ND_WRITE);
+			if (dvp) {
+				if (dvp == vp)
+					vrele(dvp);
+				else
+					vput(dvp);
+				dvp = NULL;
+			}
+			if (vp) {
+				vput(vp);
+				vp = NULL;
+			}
 			error = VOP_NREMOVE(nd.nl_ncp, nd.nl_cred);
 		}
 	}





More information about the Commits mailing list