From: Paolo 'Blaisorblade' Giarrusso Date: Fri, 23 Sep 2005 04:44:18 +0000 (-0700) Subject: [PATCH] uml: fix condition in tlb flush X-Git-Tag: v2.6.14-rc3~51^2~36 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=dc36abf34e13aabbe06cdd060c434b3cdd80e7da;p=linux-2.6-omap-h63xx.git [PATCH] uml: fix condition in tlb flush Avoid setting w = 0 twice. Spotted this (trivial) thing which is needed for another patch. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Cc: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/um/kernel/tlb.c b/arch/um/kernel/tlb.c index 0a562c3c0fd..f5b0636f9ad 100644 --- a/arch/um/kernel/tlb.c +++ b/arch/um/kernel/tlb.c @@ -193,12 +193,12 @@ void fix_range_common(struct mm_struct *mm, unsigned long start_addr, r = pte_read(*npte); w = pte_write(*npte); x = pte_exec(*npte); - if(!pte_dirty(*npte)) - w = 0; - if(!pte_young(*npte)){ - r = 0; - w = 0; - } + if (!pte_young(*npte)) { + r = 0; + w = 0; + } else if (!pte_dirty(*npte)) { + w = 0; + } if(force || pte_newpage(*npte)){ if(pte_present(*npte)) ret = add_mmap(addr,