Merge branch 'akpm' (incoming from Andrew)
Merge misc fixes from Andrew Morton: "9 fixes" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: MAINTAINERS: add closing angle bracket to Vince Bridgers' email address Documentation: fix DOCBOOKS=... building ocfs2: fix double kmem_cache_destroy in dlm_init mm/memory-failure.c: fix memory leak by race between poison and unpoison wait: swap EXIT_ZOMBIE(Z) and EXIT_DEAD(X) chars in TASK_STATE_TO_CHAR_STR memcg: fix swapcache charge from kernel thread context mm: madvise: fix MADV_WILLNEED on shmem swapouts mm/filemap.c: avoid always dirtying mapping->flags on O_DIRECT hwpoison, hugetlb: lock_page/unlock_page does not match for handling a free hugepage
This commit is contained in:
commit
fc3ac5c75b
@ -195,7 +195,7 @@ DVB_DOCUMENTED = \
|
|||||||
#
|
#
|
||||||
|
|
||||||
install_media_images = \
|
install_media_images = \
|
||||||
$(Q)cp $(OBJIMGFILES) $(MEDIA_SRC_DIR)/v4l/*.svg $(MEDIA_OBJ_DIR)/media_api
|
$(Q)-cp $(OBJIMGFILES) $(MEDIA_SRC_DIR)/v4l/*.svg $(MEDIA_OBJ_DIR)/media_api
|
||||||
|
|
||||||
$(MEDIA_OBJ_DIR)/%: $(MEDIA_SRC_DIR)/%.b64
|
$(MEDIA_OBJ_DIR)/%: $(MEDIA_SRC_DIR)/%.b64
|
||||||
$(Q)base64 -d $< >$@
|
$(Q)base64 -d $< >$@
|
||||||
|
@ -537,7 +537,7 @@ L: linux-alpha@vger.kernel.org
|
|||||||
F: arch/alpha/
|
F: arch/alpha/
|
||||||
|
|
||||||
ALTERA TRIPLE SPEED ETHERNET DRIVER
|
ALTERA TRIPLE SPEED ETHERNET DRIVER
|
||||||
M: Vince Bridgers <vbridgers2013@gmail.com
|
M: Vince Bridgers <vbridgers2013@gmail.com>
|
||||||
L: netdev@vger.kernel.org
|
L: netdev@vger.kernel.org
|
||||||
L: nios2-dev@lists.rocketboards.org (moderated for non-subscribers)
|
L: nios2-dev@lists.rocketboards.org (moderated for non-subscribers)
|
||||||
S: Maintained
|
S: Maintained
|
||||||
|
@ -472,11 +472,15 @@ bail:
|
|||||||
|
|
||||||
void dlm_destroy_master_caches(void)
|
void dlm_destroy_master_caches(void)
|
||||||
{
|
{
|
||||||
if (dlm_lockname_cache)
|
if (dlm_lockname_cache) {
|
||||||
kmem_cache_destroy(dlm_lockname_cache);
|
kmem_cache_destroy(dlm_lockname_cache);
|
||||||
|
dlm_lockname_cache = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (dlm_lockres_cache)
|
if (dlm_lockres_cache) {
|
||||||
kmem_cache_destroy(dlm_lockres_cache);
|
kmem_cache_destroy(dlm_lockres_cache);
|
||||||
|
dlm_lockres_cache = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dlm_lockres_release(struct kref *kref)
|
static void dlm_lockres_release(struct kref *kref)
|
||||||
|
@ -220,7 +220,7 @@ print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq);
|
|||||||
#define TASK_PARKED 512
|
#define TASK_PARKED 512
|
||||||
#define TASK_STATE_MAX 1024
|
#define TASK_STATE_MAX 1024
|
||||||
|
|
||||||
#define TASK_STATE_TO_CHAR_STR "RSDTtZXxKWP"
|
#define TASK_STATE_TO_CHAR_STR "RSDTtXZxKWP"
|
||||||
|
|
||||||
extern char ___assert_task_state[1 - 2*!!(
|
extern char ___assert_task_state[1 - 2*!!(
|
||||||
sizeof(TASK_STATE_TO_CHAR_STR)-1 != ilog2(TASK_STATE_MAX)+1)];
|
sizeof(TASK_STATE_TO_CHAR_STR)-1 != ilog2(TASK_STATE_MAX)+1)];
|
||||||
|
@ -257,9 +257,11 @@ static int filemap_check_errors(struct address_space *mapping)
|
|||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
/* Check for outstanding write errors */
|
/* Check for outstanding write errors */
|
||||||
if (test_and_clear_bit(AS_ENOSPC, &mapping->flags))
|
if (test_bit(AS_ENOSPC, &mapping->flags) &&
|
||||||
|
test_and_clear_bit(AS_ENOSPC, &mapping->flags))
|
||||||
ret = -ENOSPC;
|
ret = -ENOSPC;
|
||||||
if (test_and_clear_bit(AS_EIO, &mapping->flags))
|
if (test_bit(AS_EIO, &mapping->flags) &&
|
||||||
|
test_and_clear_bit(AS_EIO, &mapping->flags))
|
||||||
ret = -EIO;
|
ret = -EIO;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -195,7 +195,7 @@ static void force_shm_swapin_readahead(struct vm_area_struct *vma,
|
|||||||
for (; start < end; start += PAGE_SIZE) {
|
for (; start < end; start += PAGE_SIZE) {
|
||||||
index = ((start - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff;
|
index = ((start - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff;
|
||||||
|
|
||||||
page = find_get_page(mapping, index);
|
page = find_get_entry(mapping, index);
|
||||||
if (!radix_tree_exceptional_entry(page)) {
|
if (!radix_tree_exceptional_entry(page)) {
|
||||||
if (page)
|
if (page)
|
||||||
page_cache_release(page);
|
page_cache_release(page);
|
||||||
|
@ -1077,9 +1077,18 @@ static struct mem_cgroup *get_mem_cgroup_from_mm(struct mm_struct *mm)
|
|||||||
|
|
||||||
rcu_read_lock();
|
rcu_read_lock();
|
||||||
do {
|
do {
|
||||||
|
/*
|
||||||
|
* Page cache insertions can happen withou an
|
||||||
|
* actual mm context, e.g. during disk probing
|
||||||
|
* on boot, loopback IO, acct() writes etc.
|
||||||
|
*/
|
||||||
|
if (unlikely(!mm))
|
||||||
|
memcg = root_mem_cgroup;
|
||||||
|
else {
|
||||||
memcg = mem_cgroup_from_task(rcu_dereference(mm->owner));
|
memcg = mem_cgroup_from_task(rcu_dereference(mm->owner));
|
||||||
if (unlikely(!memcg))
|
if (unlikely(!memcg))
|
||||||
memcg = root_mem_cgroup;
|
memcg = root_mem_cgroup;
|
||||||
|
}
|
||||||
} while (!css_tryget(&memcg->css));
|
} while (!css_tryget(&memcg->css));
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
return memcg;
|
return memcg;
|
||||||
@ -3958,17 +3967,9 @@ int mem_cgroup_charge_file(struct page *page, struct mm_struct *mm,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Page cache insertions can happen without an actual mm
|
|
||||||
* context, e.g. during disk probing on boot.
|
|
||||||
*/
|
|
||||||
if (unlikely(!mm))
|
|
||||||
memcg = root_mem_cgroup;
|
|
||||||
else {
|
|
||||||
memcg = mem_cgroup_try_charge_mm(mm, gfp_mask, 1, true);
|
memcg = mem_cgroup_try_charge_mm(mm, gfp_mask, 1, true);
|
||||||
if (!memcg)
|
if (!memcg)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
|
||||||
__mem_cgroup_commit_charge(memcg, page, 1, type, false);
|
__mem_cgroup_commit_charge(memcg, page, 1, type, false);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1081,16 +1081,17 @@ int memory_failure(unsigned long pfn, int trapno, int flags)
|
|||||||
return 0;
|
return 0;
|
||||||
} else if (PageHuge(hpage)) {
|
} else if (PageHuge(hpage)) {
|
||||||
/*
|
/*
|
||||||
* Check "just unpoisoned", "filter hit", and
|
* Check "filter hit" and "race with other subpage."
|
||||||
* "race with other subpage."
|
|
||||||
*/
|
*/
|
||||||
lock_page(hpage);
|
lock_page(hpage);
|
||||||
if (!PageHWPoison(hpage)
|
if (PageHWPoison(hpage)) {
|
||||||
|| (hwpoison_filter(p) && TestClearPageHWPoison(p))
|
if ((hwpoison_filter(p) && TestClearPageHWPoison(p))
|
||||||
|| (p != hpage && TestSetPageHWPoison(hpage))) {
|
|| (p != hpage && TestSetPageHWPoison(hpage))) {
|
||||||
atomic_long_sub(nr_pages, &num_poisoned_pages);
|
atomic_long_sub(nr_pages, &num_poisoned_pages);
|
||||||
|
unlock_page(hpage);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
set_page_hwpoison_huge_page(hpage);
|
set_page_hwpoison_huge_page(hpage);
|
||||||
res = dequeue_hwpoisoned_huge_page(hpage);
|
res = dequeue_hwpoisoned_huge_page(hpage);
|
||||||
action_result(pfn, "free huge",
|
action_result(pfn, "free huge",
|
||||||
@ -1152,6 +1153,8 @@ int memory_failure(unsigned long pfn, int trapno, int flags)
|
|||||||
*/
|
*/
|
||||||
if (!PageHWPoison(p)) {
|
if (!PageHWPoison(p)) {
|
||||||
printk(KERN_ERR "MCE %#lx: just unpoisoned\n", pfn);
|
printk(KERN_ERR "MCE %#lx: just unpoisoned\n", pfn);
|
||||||
|
atomic_long_sub(nr_pages, &num_poisoned_pages);
|
||||||
|
put_page(hpage);
|
||||||
res = 0;
|
res = 0;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user