看板 DFBSD_submit 關於我們 聯絡資訊
: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); : }