Re: Convert i_next field in struct inode to a LIST

看板DFBSD_submit作者時間21年前 (2005/04/08 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/10 (看更多)
:Attached is a simple patch to convert i_next field of struct inode to a :LIST. : :Kindly review and comment/commit. : :truely :dheeraj :--=-=-= :Content-Disposition: attachment; filename=diff-inode.txt I don't think it needs to be a list, there aren't going to be more then a couple of entries in each hash chain (if that), and we need to keep that KKASSERT() intact as a safety check. -Matt Matthew Dillon <dillon@backplane.com> :... :- 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; : ip->i_flag &= ~IN_HASHED; :+ LIST_REMOVE(ip, i_hash); : } : lwkt_reltoken(&ilock); : }
文章代碼(AID): #12LNMG00 (DFBSD_submit)
討論串 (同標題文章)
文章代碼(AID): #12LNMG00 (DFBSD_submit)