From: Hugh Dickins Date: Tue, 22 Sep 2009 00:02:10 +0000 (-0700) Subject: ksm: move pages_sharing updates X-Git-Tag: v2.6.32-rc1~551 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e178dfde3952192cf44eeb0612882f01fc96c0a9;p=pandora-kernel.git ksm: move pages_sharing updates The pages_shared count is incremented and decremented when adding a node to and removing a node from the stable tree: easy to understand. But the pages_sharing count was hard to follow, being adjusted in various places: increment and decrement it when adding to and removing from the stable tree. And the pages_sharing variable used to include the pages_shared, then those were subtracted when shown in the pages_sharing sysfs file: now keep it as an exclusive count of leaves hanging off the stable tree nodes, throughout. Signed-off-by: Hugh Dickins Acked-by: Izik Eidus Acked-by: Andrea Arcangeli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed