Skip to contentSkip to conversation

init_inode_once() wants sizeof(struct hlist_head)

PATCH William Lee Irwin III 1 participant 1 message Mar 25, 2003 VFS

lore
Share & tools
lore
#0 lore raw

inode_init() wants to deal with things in in units of the size of struct hlist_head, not struct list_head.

fs/inode.c +1 -1
diff -urpN merge-2.5.66-7/fs/inode.c merge-2.5.66-8/fs/inode.c
@@ -1260,7 +1260,7 @@ void __init inode_init(unsigned long mem
 		init_waitqueue_head(&i_wait_queue_heads[i].wqh);
 
 	mempages >>= (14 - PAGE_SHIFT);
-	mempages *= sizeof(struct list_head);
+	mempages *= sizeof(struct hlist_head);
 	for (order = 0; ((1UL << order) << PAGE_SHIFT) < mempages; order++)
 		;