DragonFly submit List (threaded) for 2005-04
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: Convert i_next field in struct inode to a LIST
: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@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);
: }
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]