DragonFly BSD
DragonFly submit List (threaded) for 2005-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Convert i_next field in struct inode to a LIST


From: Joerg Sonnenberger <joerg@xxxxxxxxxxxxxxxxx>
Date: Fri, 8 Apr 2005 18:42:51 +0200
Mail-followup-to: submit@crater.dragonflybsd.org

On Fri, Apr 08, 2005 at 12:05:19PM -0400, Dheeraj Reddy wrote:
> Index: ufs_ihash.c
> ===================================================================
> RCS file: /home/dcvs/src/sys/vfs/ufs/ufs_ihash.c,v
> retrieving revision 1.15
> diff -u -r1.15 ufs_ihash.c
> --- ufs_ihash.c	20 Jan 2005 18:08:54 -0000	1.15
> +++ ufs_ihash.c	8 Apr 2005 09:32:23 -0000
> @@ -197,20 +208,14 @@
>  ufs_ihashrem(struct inode *ip)
>  {
>  	lwkt_tokref ilock;
> -	struct inode **ipp;
> +	struct ihashhead *ipp;
>  	struct inode *iq;
>  
>  	lwkt_gettoken(&ilock, &ufs_ihash_token);
>  	if (ip->i_flag & IN_HASHED) {
>  		ipp = INOHASH(ip->i_dev, ip->i_number);
> -		while ((iq = *ipp) != NULL) {
> -			if (ip == iq)
> -				break;
> -			ipp = &iq->i_next;
> -		}
> -		KKASSERT(ip == iq);
> -		*ipp = ip->i_next;
> -		ip->i_next = NULL;
> +		/* KKASSERT ?? */

		SLIST_FOREACH(iq, ipp, i_hash)
			if (ip == iq)
				break;
		KKASSERT(ip == iq);

> +		SLIST_REMOVE(ipp, ip, inode, i_hash);
>  		ip->i_flag &= ~IN_HASHED;
>  	}
>  	lwkt_reltoken(&ilock);



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