mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 04:33:26 +02:00
Merge tag 'mm-hotfixes-stable-2023-06-12-12-22' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Pull misc fixes from Andrew Morton: "19 hotfixes. 14 are cc:stable and the remainder address issues which were introduced during this development cycle or which were considered inappropriate for a backport" * tag 'mm-hotfixes-stable-2023-06-12-12-22' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: zswap: do not shrink if cgroup may not zswap page cache: fix page_cache_next/prev_miss off by one ocfs2: check new file size on fallocate call mailmap: add entry for John Keeping mm/damon/core: fix divide error in damon_nr_accesses_to_accesses_bp() epoll: ep_autoremove_wake_function should use list_del_init_careful mm/gup_test: fix ioctl fail for compat task nilfs2: reject devices with insufficient block count ocfs2: fix use-after-free when unmounting read-only filesystem lib/test_vmalloc.c: avoid garbage in page array nilfs2: fix possible out-of-bounds segment allocation in resize ioctl riscv/purgatory: remove PGO flags powerpc/purgatory: remove PGO flags x86/purgatory: remove PGO flags kexec: support purgatories with .text.hot sections mm/uffd: allow vma to merge as much as possible mm/uffd: fix vma operation where start addr cuts part of vma radix-tree: move declarations to header nilfs2: fix incomplete buffer cleanup in nilfs_btnode_abort_change_key()
This commit is contained in:
@@ -27,6 +27,8 @@
|
||||
#include <linux/string.h>
|
||||
#include <linux/xarray.h>
|
||||
|
||||
#include "radix-tree.h"
|
||||
|
||||
/*
|
||||
* Radix tree node cache.
|
||||
*/
|
||||
|
8
lib/radix-tree.h
Normal file
8
lib/radix-tree.h
Normal file
@@ -0,0 +1,8 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/* radix-tree helpers that are only shared with xarray */
|
||||
|
||||
struct kmem_cache;
|
||||
struct rcu_head;
|
||||
|
||||
extern struct kmem_cache *radix_tree_node_cachep;
|
||||
extern void radix_tree_node_rcu_free(struct rcu_head *head);
|
@@ -369,7 +369,7 @@ vm_map_ram_test(void)
|
||||
int i;
|
||||
|
||||
map_nr_pages = nr_pages > 0 ? nr_pages:1;
|
||||
pages = kmalloc(map_nr_pages * sizeof(struct page), GFP_KERNEL);
|
||||
pages = kcalloc(map_nr_pages, sizeof(struct page *), GFP_KERNEL);
|
||||
if (!pages)
|
||||
return -1;
|
||||
|
||||
|
@@ -12,6 +12,8 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/xarray.h>
|
||||
|
||||
#include "radix-tree.h"
|
||||
|
||||
/*
|
||||
* Coding conventions in this file:
|
||||
*
|
||||
@@ -247,10 +249,6 @@ void *xas_load(struct xa_state *xas)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(xas_load);
|
||||
|
||||
/* Move the radix tree node cache here */
|
||||
extern struct kmem_cache *radix_tree_node_cachep;
|
||||
extern void radix_tree_node_rcu_free(struct rcu_head *head);
|
||||
|
||||
#define XA_RCU_FREE ((struct xarray *)1)
|
||||
|
||||
static void xa_node_free(struct xa_node *node)
|
||||
|
Reference in New Issue
Block a user