Re: Convert i_next field in struct inode to a LIST

看板DFBSD_submit作者時間21年前 (2005/04/09 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串5/10 (看更多)
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);
文章代碼(AID): #12LiSI00 (DFBSD_submit)
討論串 (同標題文章)
文章代碼(AID): #12LiSI00 (DFBSD_submit)