Re: new dentry feature in 2.1.78

Linus Torvalds (torvalds@transmeta.com)
10 Jan 1998 23:16:34 GMT


In article <199801101824.MAA10013@duracef.shout.net>,
Michael Elizabeth Chastain <mec@shout.net> wrote:
>
>Well, you would have to do something about this bit of code:
>
> /* include/linux/pagemap.h */
> static inline unsigned long _page_hashfn(struct inode * inode, unsigned long offset)
> {
> #define i (((unsigned long) inode)/(sizeof(struct inode) & ~ (sizeof(struct inode) - 1)))

So, ten points to the person who can guess what the hell the above does ;)

(Hint: the calculation is not actually strictly necessary, it only tries
to aim for a better hash)

Linus