cgroup: Use kvfree in pidlist_free()
authorBandan Das <bsd@redhat.com>
Mon, 2 Mar 2015 22:51:10 +0000 (17:51 -0500)
committerTejun Heo <tj@kernel.org>
Tue, 3 Mar 2015 13:47:25 +0000 (08:47 -0500)
The wrapper already calls the appropriate free
function, use it instead of spinning our own.

Signed-off-by: Bandan Das <bsd@redhat.com>
Acked-by: Zefan Li <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup.c

index 21a4b6d61e21a8c5edadea13ed1e6cc2aac2c476..a220fdb66568eea7de9768197d2e275a04ee479b 100644 (file)
@@ -3806,10 +3806,7 @@ static void *pidlist_allocate(int count)
 
 static void pidlist_free(void *p)
 {
-       if (is_vmalloc_addr(p))
-               vfree(p);
-       else
-               kfree(p);
+       kvfree(p);
 }
 
 /*