--- include/linux/mm_types.h | 2 +- include/linux/mmu_notifier.h | 6 +++--- mm/mmu_notifier.c | 26 +++++++++++--------------- 3 files changed, 15 insertions(+), 19 deletions(-) Index: linux-2.6/include/linux/mm_types.h =================================================================== --- linux-2.6.orig/include/linux/mm_types.h 2008-04-17 17:26:27.000000000 -0700 +++ linux-2.6/include/linux/mm_types.h 2008-04-17 17:26:34.000000000 -0700 @@ -226,7 +226,7 @@ struct mm_struct { struct mem_cgroup *mem_cgroup; #endif #ifdef CONFIG_MMU_NOTIFIER - struct hlist_head mmu_notifier_list; + struct list_head mmu_notifier_list; #endif }; Index: linux-2.6/include/linux/mmu_notifier.h =================================================================== --- linux-2.6.orig/include/linux/mmu_notifier.h 2008-04-17 17:25:42.000000000 -0700 +++ linux-2.6/include/linux/mmu_notifier.h 2008-04-17 17:30:03.000000000 -0700 @@ -53,13 +53,13 @@ struct mmu_notifier_ops { }; struct mmu_notifier { - struct hlist_node hlist; + struct list_head list; const struct mmu_notifier_ops *ops; }; static inline int mm_has_notifiers(struct mm_struct *mm) { - return unlikely(!hlist_empty(&mm->mmu_notifier_list)); + return unlikely(!list_empty(&mm->mmu_notifier_list)); } extern int mmu_notifier_register(struct mmu_notifier *mn, @@ -114,7 +114,7 @@ static inline void mmu_notifier_invalida static inline void mmu_notifier_mm_init(struct mm_struct *mm) { - INIT_HLIST_HEAD(&mm->mmu_notifier_list); + INIT_LIST_HEAD(&mm->mmu_notifier_list); } #else /* CONFIG_MMU_NOTIFIER */ Index: linux-2.6/mm/mmu_notifier.c =================================================================== --- linux-2.6.orig/mm/mmu_notifier.c 2008-04-17 17:26:43.000000000 -0700 +++ linux-2.6/mm/mmu_notifier.c 2008-04-17 17:31:12.000000000 -0700 @@ -22,11 +22,11 @@ void __mmu_notifier_release(struct mm_st { struct mmu_notifier *mn; - while (unlikely(!hlist_empty(&mm->mmu_notifier_list))) { - mn = hlist_entry(mm->mmu_notifier_list.first, - struct mmu_notifier, - hlist); - hlist_del(&mn->hlist); + while (unlikely(!list_empty(&mm->mmu_notifier_list))) { + mn = list_entry(mm->mmu_notifier_list.next, + struct mmu_notifier, + list); + list_del(&mn->list); if (mn->ops->release) mn->ops->release(mn, mm); } @@ -41,10 +41,9 @@ int __mmu_notifier_clear_flush_young(str unsigned long address) { struct mmu_notifier *mn; - struct hlist_node *n; int young = 0; - hlist_for_each_entry(mn, n, &mm->mmu_notifier_list, hlist) { + list_for_each_entry(mn, &mm->mmu_notifier_list, list) { if (mn->ops->clear_flush_young) young |= mn->ops->clear_flush_young(mn, mm, address); } @@ -56,9 +55,8 @@ void __mmu_notifier_invalidate_page(stru unsigned long address) { struct mmu_notifier *mn; - struct hlist_node *n; - hlist_for_each_entry(mn, n, &mm->mmu_notifier_list, hlist) { + list_for_each_entry(mn, &mm->mmu_notifier_list, list) { if (mn->ops->invalidate_page) mn->ops->invalidate_page(mn, mm, address); } @@ -68,9 +66,8 @@ void __mmu_notifier_invalidate_range_sta unsigned long start, unsigned long end) { struct mmu_notifier *mn; - struct hlist_node *n; - hlist_for_each_entry(mn, n, &mm->mmu_notifier_list, hlist) { + list_for_each_entry(mn, &mm->mmu_notifier_list, list) { if (mn->ops->invalidate_range_start) mn->ops->invalidate_range_start(mn, mm, start, end); } @@ -80,9 +77,8 @@ void __mmu_notifier_invalidate_range_end unsigned long start, unsigned long end) { struct mmu_notifier *mn; - struct hlist_node *n; - hlist_for_each_entry(mn, n, &mm->mmu_notifier_list, hlist) { + list_for_each_entry(mn, &mm->mmu_notifier_list, list) { if (mn->ops->invalidate_range_end) mn->ops->invalidate_range_end(mn, mm, start, end); } @@ -99,7 +95,7 @@ int mmu_notifier_register(struct mmu_not rc = mm_lock(mm); if (rc) return rc; - hlist_add_head(&mn->hlist, &mm->mmu_notifier_list); + list_add(&mn->list, &mm->mmu_notifier_list); mm_unlock(mm); return 0; } @@ -119,7 +115,7 @@ int mmu_notifier_unregister(struct mmu_n rc = mm_lock(mm); if (unlikely(rc)) return rc; - hlist_del(&mn->hlist); + list_del(&mn->list); mm_unlock(mm); return 0; }