From mboxrd@z Thu Jan 1 00:00:00 1970 From: pmkernel@gmail.com (piyush moghe) Date: Thu, 30 Jun 2011 14:48:01 +0530 Subject: hlist_add_head In-Reply-To: References: <20110609042849.GA2036@michaelblizek.twilightparadox.com> <20110609044658.GB2036@michaelblizek.twilightparadox.com> <1B669E39-A018-40D5-BEEB-570C810D1017@gmail.com> <4E09E6B3.3070909@gmail.com> Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Thu, Jun 30, 2011 at 2:47 PM, piyush moghe wrote: > AFAIK hlist_add_head is a function to add a node at first position in > collision chain at particular head ( hash bucket ) > > For ex. whenever a new inode is allocated the hash value of that inode is > calculated which acts as an index in inode_hashtable > which subsequently provides and hash bucket ( head ) for that inode. Now > this inode attached at the first position in collision chain for the > calculated hash bucket pushing the current first inode to second position. > > For further clarification have a look at inode_add_to_lists() and > __inode_add_to_lists() functions. > > Regards, > Piyush > > > On Tue, Jun 28, 2011 at 8:05 PM, luca ellero wrote: > >> Hi everybody, >> can someone please explain what is the role of hlist_add_head (used in >> in hash lists). Or maybe provide some links with good examples of its >> use. I had a look at fs/dcache.c but frankly I can't understand it very >> well. >> Thanks in advance >> Luca >> >> _______________________________________________ >> Kernelnewbies mailing list >> Kernelnewbies at kernelnewbies.org >> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110630/14a130f7/attachment.html