mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 19:19:32 +03:00
Use kernel slab for vn_cache and vn_file_cache
Resolve a false positive in the kmemleak checker by shifting to the kernel slab. It shows up because vn_file_cache is using KMC_KMEM which is directly allocated using __get_free_pages, which is not automatically tracked by kmemleak. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Chunwei Chen <david.chen@osnexus.com> Closes #599
This commit is contained in:
parent
43b857fddb
commit
97048200f8
@ -897,13 +897,13 @@ spl_vn_init(void)
|
|||||||
sizeof(struct vnode), 64,
|
sizeof(struct vnode), 64,
|
||||||
vn_cache_constructor,
|
vn_cache_constructor,
|
||||||
vn_cache_destructor,
|
vn_cache_destructor,
|
||||||
NULL, NULL, NULL, KMC_KMEM);
|
NULL, NULL, NULL, 0);
|
||||||
|
|
||||||
vn_file_cache = kmem_cache_create("spl_vn_file_cache",
|
vn_file_cache = kmem_cache_create("spl_vn_file_cache",
|
||||||
sizeof(file_t), 64,
|
sizeof(file_t), 64,
|
||||||
vn_file_cache_constructor,
|
vn_file_cache_constructor,
|
||||||
vn_file_cache_destructor,
|
vn_file_cache_destructor,
|
||||||
NULL, NULL, NULL, KMC_KMEM);
|
NULL, NULL, NULL, 0);
|
||||||
return (0);
|
return (0);
|
||||||
} /* vn_init() */
|
} /* vn_init() */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user