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

Re: Re2: NTFS problems.


From: Adam K Kirchhoff <adamk@xxxxxxxxxxxx>
Date: 29 Dec 2003 15:57:05 GMT

Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx> wrote:
>     Wait, I might have found it... please try the following patch.

So far so good.  I patched last night and recompiled the kernel and
modules.  I've mounted and unmounted the NTFS partition about a dozen
times.  I'll pop back in a few days to let you know how I make out.

Adam


> 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]