Convert i_next field in struct inode to a LIST
Matthew Dillon
dillon at apollo.backplane.com
Thu Apr 7 10:58:52 PDT 2005
: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 at xxxxxxxxxxxxx>
:...
:- 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);
: }
More information about the Submit
mailing list