]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[PATCH] mm: unmap_vmas with inner ptlock
authorHugh Dickins <hugh@veritas.com>
Sun, 30 Oct 2005 01:16:30 +0000 (18:16 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 30 Oct 2005 04:40:41 +0000 (21:40 -0700)
commit508034a32b819a2d40aa7ac0dbc8cd2e044c2de6
tree906a8f0095af24f403b30d649d3ec1ffb4ff2f50
parent8f4f8c164cb4af1432cc25eda82928ea4519ba72
[PATCH] mm: unmap_vmas with inner ptlock

Remove the page_table_lock from around the calls to unmap_vmas, and replace
the pte_offset_map in zap_pte_range by pte_offset_map_lock: all callers are
now safe to descend without page_table_lock.

Don't attempt fancy locking for hugepages, just take page_table_lock in
unmap_hugepage_range.  Which makes zap_hugepage_range, and the hugetlb test in
zap_page_range, redundant: unmap_vmas calls unmap_hugepage_range anyway.  Nor
does unmap_vmas have much use for its mm arg now.

The tlb_start_vma and tlb_end_vma in unmap_page_range are now called without
page_table_lock: if they're implemented at all, they typically come down to
flush_cache_range (usually done outside page_table_lock) and flush_tlb_range
(which we already audited for the mprotect case).

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/hugetlbfs/inode.c
include/linux/hugetlb.h
include/linux/mm.h
mm/hugetlb.c
mm/memory.c
mm/mmap.c