diff options
author | Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> | 2005-09-03 15:54:56 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@evo.osdl.org> | 2005-09-05 00:05:45 -0700 |
commit | 4944e76d81801b8e60ed3e7789443f210c16ed65 (patch) | |
tree | d20096acf35b1af03eba1d043e6376a154cae054 /mm | |
parent | d44ed4f86892e350f4b16a3489b7e7c1a9bb7ead (diff) | |
download | op-kernel-dev-4944e76d81801b8e60ed3e7789443f210c16ed65.zip op-kernel-dev-4944e76d81801b8e60ed3e7789443f210c16ed65.tar.gz |
[PATCH] mm: remove implied vm_ops check
If !vma->vm-ops we already BUG above, so retesting it is useless. The
compiler cannot optimize this because BUG is a macro and is not thus marked
noreturn; that should possibly be fixed.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memory.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memory.c b/mm/memory.c index a596c11..b25f5e5 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -1955,7 +1955,7 @@ static int do_file_page(struct mm_struct * mm, struct vm_area_struct * vma, * Fall back to the linear mapping if the fs does not support * ->populate: */ - if (!vma->vm_ops || !vma->vm_ops->populate || + if (!vma->vm_ops->populate || (write_access && !(vma->vm_flags & VM_SHARED))) { pte_clear(mm, address, pte); return do_no_page(mm, vma, address, write_access, pte, pmd); |