diff options
author | Alex Shi <alex.shi@linaro.org> | 2017-07-22 12:02:03 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2017-07-22 12:02:03 +0800 |
commit | b017a97fcc4f4649ee687d568b7e856829aad6b5 (patch) | |
tree | 31b34798a048ab880a0e483b1e864a3bb4249881 /mm | |
parent | 5289d9c979092878f2bf741d8b365ef7565fb6db (diff) | |
parent | ece78cd779f4f306a869f217bc0236507b0fe5f5 (diff) |
Merge tag 'v4.4.78' into linux-linaro-lsk-v4.4
This is the 4.4.78 stable release
Diffstat (limited to 'mm')
-rw-r--r-- | mm/list_lru.c | 14 | ||||
-rw-r--r-- | mm/mmap.c | 2 |
2 files changed, 7 insertions, 9 deletions
diff --git a/mm/list_lru.c b/mm/list_lru.c index 5d8dffd5b57c..786176b1a0ee 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 diff --git a/mm/mmap.c b/mm/mmap.c index 0990f8bc0fbe..eaa460ddcaf9 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -2176,7 +2176,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; |