fs: introduce __getname_gfp()
The purpose of this change is to allow __getname() users to pass a custom GFP mask to kmem_cache_alloc(). This is needed for annotating a certain kmemcheck false positive. Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
This commit is contained in:
Родитель
1744a21d57
Коммит
3446a8aa7e
|
@ -1919,7 +1919,8 @@ extern void __init vfs_caches_init(unsigned long);
|
||||||
|
|
||||||
extern struct kmem_cache *names_cachep;
|
extern struct kmem_cache *names_cachep;
|
||||||
|
|
||||||
#define __getname() kmem_cache_alloc(names_cachep, GFP_KERNEL)
|
#define __getname_gfp(gfp) kmem_cache_alloc(names_cachep, (gfp))
|
||||||
|
#define __getname() __getname_gfp(GFP_KERNEL)
|
||||||
#define __putname(name) kmem_cache_free(names_cachep, (void *)(name))
|
#define __putname(name) kmem_cache_free(names_cachep, (void *)(name))
|
||||||
#ifndef CONFIG_AUDITSYSCALL
|
#ifndef CONFIG_AUDITSYSCALL
|
||||||
#define putname(name) __putname(name)
|
#define putname(name) __putname(name)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче