Skip to content

Commit b43790e

Browse files
Cyrill Gorcunovtorvalds
authored andcommitted
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>
1 parent 0bf0733 commit b43790e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎mm/rmap.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1361,7 +1361,7 @@ static int try_to_unmap_cluster(unsigned long cursor, unsigned int *mapcount,
13611361
if (page->index != linear_page_index(vma, address)) {
13621362
pte_t ptfile = pgoff_to_pte(page->index);
13631363
if (pte_soft_dirty(pteval))
1364-
pte_file_mksoft_dirty(ptfile);
1364+
ptfile = pte_file_mksoft_dirty(ptfile);
13651365
set_pte_at(mm, address, pte, ptfile);
13661366
}
13671367

0 commit comments

Comments
 (0)