diff options
author | Hugh Dickins <hughd@google.com> | 2017-02-07 14:11:16 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-07 15:08:32 -0500 |
commit | b6789123bccba8b5feb9901ed2e8c3c39181979d (patch) | |
tree | 91243683ee007ed611fa01a3cbb89fc814fcb3db /fs/proc/page.c | |
parent | a524c218bc94c705886a0e0fedeee45d1931da32 (diff) |
mm: fix KPF_SWAPCACHE in /proc/kpageflags
Commit 6326fec1122c ("mm: Use owner_priv bit for PageSwapCache, valid
when PageSwapBacked") aliased PG_swapcache to PG_owner_priv_1 (and
depending on PageSwapBacked being true).
As a result, the KPF_SWAPCACHE bit in '/proc/kpageflags' should now be
synthesized, instead of being shown on unrelated pages which just happen
to have PG_owner_priv_1 set.
Signed-off-by: Hugh Dickins <hughd@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/proc/page.c')
-rw-r--r-- | fs/proc/page.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/proc/page.c b/fs/proc/page.c index a2066e6dee90..2726536489b1 100644 --- a/fs/proc/page.c +++ b/fs/proc/page.c | |||
@@ -173,7 +173,8 @@ u64 stable_page_flags(struct page *page) | |||
173 | u |= kpf_copy_bit(k, KPF_ACTIVE, PG_active); | 173 | u |= kpf_copy_bit(k, KPF_ACTIVE, PG_active); |
174 | u |= kpf_copy_bit(k, KPF_RECLAIM, PG_reclaim); | 174 | u |= kpf_copy_bit(k, KPF_RECLAIM, PG_reclaim); |
175 | 175 | ||
176 | u |= kpf_copy_bit(k, KPF_SWAPCACHE, PG_swapcache); | 176 | if (PageSwapCache(page)) |
177 | u |= 1 << KPF_SWAPCACHE; | ||
177 | u |= kpf_copy_bit(k, KPF_SWAPBACKED, PG_swapbacked); | 178 | u |= kpf_copy_bit(k, KPF_SWAPBACKED, PG_swapbacked); |
178 | 179 | ||
179 | u |= kpf_copy_bit(k, KPF_UNEVICTABLE, PG_unevictable); | 180 | u |= kpf_copy_bit(k, KPF_UNEVICTABLE, PG_unevictable); |