Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <gorcunov@openvz.org>
Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Cyrill Gorcunov and committed by
Linus Torvalds
b43790ee 0bf07331

+1 -1
+1 -1
mm/rmap.c
··· 1361 1361 if (page->index != linear_page_index(vma, address)) { 1362 1362 pte_t ptfile = pgoff_to_pte(page->index); 1363 1363 if (pte_soft_dirty(pteval)) 1364 - pte_file_mksoft_dirty(ptfile); 1364 + ptfile = pte_file_mksoft_dirty(ptfile); 1365 1365 set_pte_at(mm, address, pte, ptfile); 1366 1366 } 1367 1367