projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mm, compaction: use correct watermark when checking compaction success
[cascardo/linux.git]
/
mm
/
rmap.c
diff --git
a/mm/rmap.c
b/mm/rmap.c
index
709bc83
..
1ef3640
100644
(file)
--- a/
mm/rmap.c
+++ b/
mm/rmap.c
@@
-1284,8
+1284,9
@@
void page_add_file_rmap(struct page *page, bool compound)
VM_BUG_ON_PAGE(!PageSwapBacked(page), page);
__inc_node_page_state(page, NR_SHMEM_PMDMAPPED);
} else {
VM_BUG_ON_PAGE(!PageSwapBacked(page), page);
__inc_node_page_state(page, NR_SHMEM_PMDMAPPED);
} else {
- if (PageTransCompound(page)) {
- VM_BUG_ON_PAGE(!PageLocked(page), page);
+ if (PageTransCompound(page) && page_mapping(page)) {
+ VM_WARN_ON_ONCE(!PageLocked(page));
+
SetPageDoubleMap(compound_head(page));
if (PageMlocked(page))
clear_page_mlock(compound_head(page));
SetPageDoubleMap(compound_head(page));
if (PageMlocked(page))
clear_page_mlock(compound_head(page));
@@
-1303,7
+1304,7
@@
static void page_remove_file_rmap(struct page *page, bool compound)
{
int i, nr = 1;
{
int i, nr = 1;
- VM_BUG_ON_PAGE(compound && !Page
TransHuge
(page), page);
+ VM_BUG_ON_PAGE(compound && !Page
Head
(page), page);
lock_page_memcg(page);
/* Hugepages are not counted in NR_FILE_MAPPED for now. */
lock_page_memcg(page);
/* Hugepages are not counted in NR_FILE_MAPPED for now. */