Convert i_next field in struct inode to a LIST
Joerg Sonnenberger
joerg at britannica.bec.de
Fri Apr 8 09:43:02 PDT 2005
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);
More information about the Submit
mailing list