From: Cyrill Gorcunov Date: Wed, 4 Jun 2014 23:06:41 +0000 (-0700) Subject: mm: softdirty: make freshly remapped file pages being softdirty unconditionally X-Git-Tag: omap-for-v3.16/fixes-against-rc1~56^2~16^2~228 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0bf073315cb29d2e9e68b6c5da97862a519e3320;p=pandora-kernel.git mm: softdirty: make freshly remapped file pages being softdirty unconditionally Hugh reported: | I noticed your soft_dirty work in install_file_pte(): which looked | good at first, until I realized that it's propagating the soft_dirty | of a pte it's about to zap completely, to the unrelated entry it's | about to insert in its place. Which seems very odd to me. Indeed this code ends up being nop in result -- pte_file_mksoft_dirty() operates with pte_t argument and returns new pte_t which were never used after. After looking more I think what we need is to soft-dirtify all newely remapped file pages because it should look like a new mapping for memory tracker. Signed-off-by: Cyrill Gorcunov Reported-by: Hugh Dickins Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed