Re2: NTFS problems.

Adam K Kirchhoff adamk at voicenet.com
Sun Dec 28 12:21:55 PST 2003


I'll give it a shot as soon as I can (in the next few days).  I have
noticed, since I originally posted about the problem, that it isn't always
consistent, so even after trying the patch, I may not be able to say with
100% certainty that it works till it's be tested for a few more days.

Adam

On Sun, 28 Dec 2003, Matthew Dillon wrote:

>     Wait, I might have found it... please try the following patch.
>
> 					-Matt
> 					Matthew Dillon
> 					<dillon at 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);
>  }
>
>





More information about the Bugs mailing list