pte_file_mksoft_dirty operates with argument passed by
a value and returns modified result thus need to assign
@ptfile here, otherwise it's nop operation which may lead
to lose of softdirty bit.

CC: Pavel Emelyanov <[email protected]>
CC: Andrew Morton <[email protected]>
Signed-off-by: Cyrill Gorcunov <[email protected]>
---
 mm/rmap.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.git/mm/rmap.c
===================================================================
--- linux-2.6.git.orig/mm/rmap.c
+++ linux-2.6.git/mm/rmap.c
@@ -1339,7 +1339,7 @@ static int try_to_unmap_cluster(unsigned
                if (page->index != linear_page_index(vma, address)) {
                        pte_t ptfile = pgoff_to_pte(page->index);
                        if (pte_soft_dirty(pteval))
-                               pte_file_mksoft_dirty(ptfile);
+                               ptfile = pte_file_mksoft_dirty(ptfile);
                        set_pte_at(mm, address, pte, ptfile);
                }
 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to