diff options
author | Alex Shi <alex.shi@linaro.org> | 2017-07-22 04:02:29 (GMT) |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2017-07-22 04:02:29 (GMT) |
commit | 97baec00952afead33eea0b1b97ee4d5850dce00 (patch) | |
tree | f3d068808ef99b1044fc7148ff104d038236d398 /mm | |
parent | b8f0ea4f0a4a93c5bb0cd0db7a606e7d476d2179 (diff) | |
parent | c03917de04aa68017a737e90ea01338d991eaff5 (diff) | |
download | linux-97baec00952afead33eea0b1b97ee4d5850dce00.tar.xz |
Merge remote-tracking branch 'lts/linux-4.9.y' into linux-linaro-lsk-v4.9
Diffstat (limited to 'mm')
-rw-r--r-- | mm/huge_memory.c | 2 | ||||
-rw-r--r-- | mm/list_lru.c | 14 | ||||
-rw-r--r-- | mm/mmap.c | 2 |
3 files changed, 8 insertions, 10 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index e7d5db9..8258e9e 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -1373,8 +1373,8 @@ bool madvise_free_huge_pmd(struct mmu_gather *tlb, struct vm_area_struct *vma, get_page(page); spin_unlock(ptl); split_huge_page(page); - put_page(page); unlock_page(page); + put_page(page); goto out_unlocked; } diff --git a/mm/list_lru.c b/mm/list_lru.c index 234676e..7a40fa2 100644 --- a/mm/list_lru.c +++ b/mm/list_lru.c @@ -117,6 +117,7 @@ bool list_lru_add(struct list_lru *lru, struct list_head *item) l = list_lru_from_kmem(nlru, item); list_add_tail(item, &l->list); l->nr_items++; + nlru->nr_items++; spin_unlock(&nlru->lock); return true; } @@ -136,6 +137,7 @@ bool list_lru_del(struct list_lru *lru, struct list_head *item) l = list_lru_from_kmem(nlru, item); list_del_init(item); l->nr_items--; + nlru->nr_items--; spin_unlock(&nlru->lock); return true; } @@ -183,15 +185,10 @@ EXPORT_SYMBOL_GPL(list_lru_count_one); unsigned long list_lru_count_node(struct list_lru *lru, int nid) { - long count = 0; - int memcg_idx; + struct list_lru_node *nlru; - count += __list_lru_count_one(lru, nid, -1); - if (list_lru_memcg_aware(lru)) { - for_each_memcg_cache_index(memcg_idx) - count += __list_lru_count_one(lru, nid, memcg_idx); - } - return count; + nlru = &lru->node[nid]; + return nlru->nr_items; } EXPORT_SYMBOL_GPL(list_lru_count_node); @@ -226,6 +223,7 @@ restart: assert_spin_locked(&nlru->lock); case LRU_REMOVED: isolated++; + nlru->nr_items--; /* * If the lru lock has been dropped, our list * traversal is now invalid and so we have to @@ -2228,7 +2228,7 @@ int expand_upwards(struct vm_area_struct *vma, unsigned long address) /* Guard against exceeding limits of the address space. */ address &= PAGE_MASK; - if (address >= TASK_SIZE) + if (address >= (TASK_SIZE & PAGE_MASK)) return -ENOMEM; address += PAGE_SIZE; |