DragonFly BSD
DragonFly bugs List (threaded) for 2003-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re2: NTFS problems.


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Sun, 28 Dec 2003 12:03:35 -0800 (PST)

    Wait, I might have found it... please try the following patch.

					-Matt
					Matthew Dillon 
					<dillon@xxxxxxxxxxxxx>


Index: ntfs_subr.c
===================================================================
RCS file: /cvs/src/sys/vfs/ntfs/ntfs_subr.c,v
retrieving revision 1.8
diff -u -r1.8 ntfs_subr.c
--- ntfs_subr.c	20 Aug 2003 09:56:33 -0000	1.8
+++ ntfs_subr.c	28 Dec 2003 20:03:08 -0000
@@ -359,8 +359,8 @@
 	dprintf(("ntfs_ntget: get ntnode %d: %p, usecount: %d\n",
 		ip->i_number, ip, ip->i_usecount));
 
-	lwkt_gettoken(&ip->i_interlock);
 	ip->i_usecount++;
+	lwkt_gettoken(&ip->i_interlock);
 	LOCKMGR(&ip->i_lock, LK_EXCLUSIVE | LK_INTERLOCK, &ip->i_interlock);
 
 	return 0;
@@ -465,7 +465,7 @@
 		LIST_REMOVE(vap,va_list);
 		ntfs_freentvattr(vap);
 	}
-
+	lwkt_reltoken(&ip->i_interlock);
 	vrele(ip->i_devvp);
 	FREE(ip, M_NTFSNTNODE);
 }
@@ -477,9 +477,7 @@
 ntfs_ntref(ip)
 	struct ntnode *ip;
 {
-	lwkt_gettoken(&ip->i_interlock);
 	ip->i_usecount++;
-	lwkt_reltoken(&ip->i_interlock);
 
 	dprintf(("ntfs_ntref: ino %d, usecount: %d\n",
 		ip->i_number, ip->i_usecount));
@@ -499,9 +497,10 @@
 	lwkt_gettoken(&ip->i_interlock);
 	ip->i_usecount--;
 
-	if (ip->i_usecount < 0)
+	if (ip->i_usecount < 0) {
 		panic("ntfs_ntrele: ino: %d usecount: %d \n",
 		      ip->i_number,ip->i_usecount);
+	}
 	lwkt_reltoken(&ip->i_interlock);
 }
 



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