DragonFly BSD
DragonFly commits List (threaded) for 2006-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

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


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 3 Mar 2006 09:54:59 -0800 (PST)

: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@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);
 		}
 	}



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