EMM: Fix rcu handling and spelling

From: Christoph Lameter
Date: Wed Apr 02 2008 - 14:45:48 EST


Subject: EMM: Fix rcu handling and spelling

Fix the way rcu_dereference is done.

Signed-off-by: Christoph Lameter <clameter@xxxxxxx>

---
include/linux/rmap.h | 2 +-
mm/rmap.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)

Index: linux-2.6/include/linux/rmap.h
===================================================================
--- linux-2.6.orig/include/linux/rmap.h 2008-04-02 11:41:58.737866596 -0700
+++ linux-2.6/include/linux/rmap.h 2008-04-02 11:42:08.282029661 -0700
@@ -91,7 +91,7 @@ static inline void page_dup_rmap(struct
* when the VM removes references to pages.
*/
enum emm_operation {
- emm_release, /* Process existing, */
+ emm_release, /* Process exiting, */
emm_invalidate_start, /* Before the VM unmaps pages */
emm_invalidate_end, /* After the VM unmapped pages */
emm_referenced /* Check if a range was referenced */
Index: linux-2.6/mm/rmap.c
===================================================================
--- linux-2.6.orig/mm/rmap.c 2008-04-02 11:41:58.737866596 -0700
+++ linux-2.6/mm/rmap.c 2008-04-02 11:42:08.282029661 -0700
@@ -303,7 +303,7 @@ EXPORT_SYMBOL_GPL(emm_notifier_register)
int __emm_notify(struct mm_struct *mm, enum emm_operation op,
unsigned long start, unsigned long end)
{
- struct emm_notifier *e = rcu_dereference(mm)->emm_notifier;
+ struct emm_notifier *e = rcu_dereference(mm->emm_notifier);
int x;

while (e) {
@@ -317,7 +317,7 @@ int __emm_notify(struct mm_struct *mm, e
* emm_notifier contents (e) must be fetched after
* the retrival of the pointer to the notifier.
*/
- e = rcu_dereference(e)->next;
+ e = rcu_dereference(e->next);
}
return 0;
}

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/