Skip to contentSkip to conversation

cgroup: Use kvfree in pidlist_free()

PATCH Applied Bandan Das 3 participants 3 messages Mar 2, 2015 – Mar 3, 2015 cgroup

lore
Share & tools
lore

Bandan Das

author
#0 lore raw

PATCH 1/1 cgroup: Use kvfree in pidlist_free()

The wrapper already calls the appropriate free
function, use it instead of spinning our own.

---
 kernel/cgroup.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
kernel/cgroup.c +1 -4
index 29a7b2c..c19d66d 100644
@@ -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);
 }
 
 /*
Signature · 1 line
2.1.0
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Bandan Das

The wrapper already calls the appropriate free
function, use it instead of spinning our own.

Quoted 21 lines
---
 kernel/cgroup.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
kernel/cgroup.c +1 -4
index 29a7b2c..c19d66d 100644
@@ -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);
 }
 
 /*