mm: softdirty: keep bit when zapping file pte
This fixes the same bug as b43790eedd31 ("mm: softdirty: don't forget to
save file map softdiry bit on unmap") and 9aed8614af5a ("mm/memory.c:
don't forget to set softdirty on file mapped fault") where the return
value of pte_*mksoft_dirty was being ignored.
To be sure that no other pte/pmd "mk" function return values were being
ignored, I annotated the functions in arch/x86/include/asm/pgtable.h
with __must_check and rebuilt.
The userspace effect of this bug is that the softdirty mark might be
lost if a file mapped pte get zapped.
Signed-off-by: Peter Feiner <firstname.lastname@example.org>
Acked-by: Cyrill Gorcunov <email@example.com>
Cc: Pavel Emelyanov <firstname.lastname@example.org>
Cc: Jamie Liu <email@example.com>
Cc: Hugh Dickins <firstname.lastname@example.org>
Cc: <email@example.com> [3.12+]
Signed-off-by: Andrew Morton <firstname.lastname@example.org>
Signed-off-by: Linus Torvalds <email@example.com>
1 file changed