From bf53cedab40eb559adc4b38ddb59fe7e8bf149b0 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Tue, 17 Sep 2002 06:35:53 -0700 Subject: [PATCH] mmap cleanup and lock ranking fixes Patch by Christoph Hellwig. This patch is cleanup of mmap.c with the side-effect of making the lock order of mapping->i_shared_lock and mm->page_table_lock consistant. __remove_shared_vm_struct is merged into its only caller, remove_shared_vm_struct, which now also does the job of {lock,unlock}_vma_mappings itself, to avoid duplicate checks. Similarly, vma_link is updated to take and release i_shared_lock itself, fixing the lock order. split_vma is updated to use insert_vm_struct instead of using __insert_vm_struct and taking page_table_lock and i_shared_lock itself (wrongly). __insert_vm_struct is removed as it is unused now. --- include/linux/mm.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include/linux') diff --git a/include/linux/mm.h b/include/linux/mm.h index 3b7f9ba55dc0..7483c39e28dd 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -431,10 +431,7 @@ extern int can_share_swap_page(struct page *); extern int remove_exclusive_swap_page(struct page *); /* mmap.c */ -extern void lock_vma_mappings(struct vm_area_struct *); -extern void unlock_vma_mappings(struct vm_area_struct *); extern void insert_vm_struct(struct mm_struct *, struct vm_area_struct *); -extern void __insert_vm_struct(struct mm_struct *, struct vm_area_struct *); extern void build_mmap_rb(struct mm_struct *); extern void exit_mmap(struct mm_struct *); -- cgit v1.2.3