summaryrefslogtreecommitdiff
path: root/mm/util.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2006-10-04 02:15:25 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-04 07:55:13 -0700
commit1d2c8eea698514cfaa53fc991b960791d09508e1 (patch)
treee6e2b2d491e7e7256862fcc493b81815cc966312 /mm/util.c
parent88ca3b94e82e763ef90c8e57cacd51a3c143ea62 (diff)
downloadlinux-stable-1d2c8eea698514cfaa53fc991b960791d09508e1.tar.gz
linux-stable-1d2c8eea698514cfaa53fc991b960791d09508e1.tar.bz2
linux-stable-1d2c8eea698514cfaa53fc991b960791d09508e1.zip
[PATCH] slab: clean up leak tracking ifdefs a little bit
- rename ____kmalloc to kmalloc_track_caller so that people have a chance to guess what it does just from it's name. Add a comment describing it for those who don't. Also move it after kmalloc in slab.h so people get less confused when they are just looking for kmalloc - move things around in slab.c a little to reduce the ifdef mess. [penberg@cs.helsinki.fi: Fix up reversed #ifdef] Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Cc: Christoph Lameter <clameter@engr.sgi.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm/util.c')
-rw-r--r--mm/util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/util.c b/mm/util.c
index e14fa84ef39a..ace2aea69f1a 100644
--- a/mm/util.c
+++ b/mm/util.c
@@ -11,7 +11,7 @@
*/
void *__kzalloc(size_t size, gfp_t flags)
{
- void *ret = ____kmalloc(size, flags);
+ void *ret = kmalloc_track_caller(size, flags);
if (ret)
memset(ret, 0, size);
return ret;
@@ -33,7 +33,7 @@ char *kstrdup(const char *s, gfp_t gfp)
return NULL;
len = strlen(s) + 1;
- buf = ____kmalloc(len, gfp);
+ buf = kmalloc_track_caller(len, gfp);
if (buf)
memcpy(buf, s, len);
return buf;
@@ -51,7 +51,7 @@ void *kmemdup(const void *src, size_t len, gfp_t gfp)
{
void *p;
- p = ____kmalloc(len, gfp);
+ p = kmalloc_track_caller(len, gfp);
if (p)
memcpy(p, src, len);
return p;