diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2016-09-01 12:33:46 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2016-09-01 12:33:46 -0400 |
commit | 0cb7bf61b1e9f05027de58c80f9b46a714d24e35 (patch) | |
tree | 41fb55cf62d07b425122f9a8b96412c0d8eb99c5 /mm/rmap.c | |
parent | aa877175e7a9982233ed8f10cb4bfddd78d82741 (diff) | |
parent | 3eab887a55424fc2c27553b7bfe32330df83f7b8 (diff) |
Merge branch 'linus' into smp/hotplug
Apply upstream changes to avoid conflicts with pending patches.
Diffstat (limited to 'mm/rmap.c')
-rw-r--r-- | mm/rmap.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1284,8 +1284,9 @@ void page_add_file_rmap(struct page *page, bool compound) | |||
1284 | VM_BUG_ON_PAGE(!PageSwapBacked(page), page); | 1284 | VM_BUG_ON_PAGE(!PageSwapBacked(page), page); |
1285 | __inc_node_page_state(page, NR_SHMEM_PMDMAPPED); | 1285 | __inc_node_page_state(page, NR_SHMEM_PMDMAPPED); |
1286 | } else { | 1286 | } else { |
1287 | if (PageTransCompound(page)) { | 1287 | if (PageTransCompound(page) && page_mapping(page)) { |
1288 | VM_BUG_ON_PAGE(!PageLocked(page), page); | 1288 | VM_WARN_ON_ONCE(!PageLocked(page)); |
1289 | |||
1289 | SetPageDoubleMap(compound_head(page)); | 1290 | SetPageDoubleMap(compound_head(page)); |
1290 | if (PageMlocked(page)) | 1291 | if (PageMlocked(page)) |
1291 | clear_page_mlock(compound_head(page)); | 1292 | clear_page_mlock(compound_head(page)); |
@@ -1303,7 +1304,7 @@ static void page_remove_file_rmap(struct page *page, bool compound) | |||
1303 | { | 1304 | { |
1304 | int i, nr = 1; | 1305 | int i, nr = 1; |
1305 | 1306 | ||
1306 | VM_BUG_ON_PAGE(compound && !PageTransHuge(page), page); | 1307 | VM_BUG_ON_PAGE(compound && !PageHead(page), page); |
1307 | lock_page_memcg(page); | 1308 | lock_page_memcg(page); |
1308 | 1309 | ||
1309 | /* Hugepages are not counted in NR_FILE_MAPPED for now. */ | 1310 | /* Hugepages are not counted in NR_FILE_MAPPED for now. */ |