[patch 4/6] mm: comment mmap_sem / lock_page lockorder

Nick Piggin
2006-10-13T16:44:32Z

Add a few more examples to the mmap_sem / lock_page ordering.

Signed-off-by: Nick Piggin <npiggin@suse.de>

Index: linux-2.6/mm/filemap.c
===================================================================
--- linux-2.6.orig/mm/filemap.c
+++ linux-2.6/mm/filemap.c
@@ -73,7 +73,7 @@ generic_file_direct_IO(int rw, struct ki
* ->mapping->tree_lock (arch-dependent flush_dcache_mmap_lock)
*
* ->mmap_sem
- * ->lock_page (access_process_vm)
+ * ->lock_page (page fault, sys_mmap, access_process_vm)
*
* ->mmap_sem
* ->i_mutex (msync)
Index: linux-2.6/mm/rmap.c
===================================================================
--- linux-2.6.orig/mm/rmap.c
+++ linux-2.6/mm/rmap.c
@@ -29,7 +29,7 @@
* taken together; in truncation, i_mutex is taken outermost.
*
* mm->mmap_sem
- * page->flags PG_locked (lock_page)
+ * page->flags PG_locked (lock_page, eg from pagefault)
* mapping->i_mmap_lock
* anon_vma->lock
* mm->page_table_lock or pte_lock