From: Cyrill Gorcunov Date: Thu, 22 May 2014 00:42:44 +0000 (+1000) Subject: mm: softdirty: don't forget to save file map softdiry bit on unmap X-Git-Tag: next-20140530~2^2~383 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=edab7a7e7be320fabec6ecbecee1d7b5ffdf926f;p=karo-tx-linux.git mm: softdirty: don't forget to save file map softdiry bit on unmap pte_file_mksoft_dirty operates with argument passed by a value and returns modified result thus we need to assign @ptfile here, otherwise itis a no-op which may lead to loss of the softdirty bit. Signed-off-by: Cyrill Gorcunov Cc: Pavel Emelyanov Cc: Hugh Dickins Signed-off-by: Andrew Morton --- diff --git a/mm/rmap.c b/mm/rmap.c index 79f21809a9ec..1c08cbdf40de 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -1355,7 +1355,7 @@ static int try_to_unmap_cluster(unsigned long cursor, unsigned int *mapcount, 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); }