Skip to content

Commit

Permalink
fs: introduce __getname_gfp()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Vegard Nossum <[email protected]>
  • Loading branch information
vegard committed Jun 15, 2009
1 parent 1744a21 commit 3446a8a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions include/linux/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1919,8 +1919,9 @@ extern void __init vfs_caches_init(unsigned long);

extern struct kmem_cache *names_cachep;

#define __getname() kmem_cache_alloc(names_cachep, GFP_KERNEL)
#define __putname(name) kmem_cache_free(names_cachep, (void *)(name))
#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))
#ifndef CONFIG_AUDITSYSCALL
#define putname(name) __putname(name)
#else
Expand Down

0 comments on commit 3446a8a

Please sign in to comment.