[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.
Showing
Please register or sign in to comment