Skip to contentSkip to conversation

slqb: use correct name for rcu callback

PATCH In review Lai Jiangshan 2 participants 2 messages Mar 3, 2009 Memory management

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 slqb: use correct name for rcu callback

struct slqb_page defines struct rcu_head rcu_head for rcu, the rcu callback should use it.

---

mm/slqb.c +1 -1
index 07bf5b3..48bdf3b 100644
@@ -1026,7 +1043,7 @@ static void rcu_free_slab(struct rcu_head *h)
 {
 	struct slqb_page *page;
 
-	page = container_of((struct list_head *)h, struct slqb_page, lru);
+	page = container_of(h, struct slqb_page, rcu_head);
 	__free_slab(page->list->cache, page);
 }
 
Acked-by on v1 1/1
#1 lore raw

Thanks.

Quoted 20 lines · Lai Jiangshan

struct slqb_page defines struct rcu_head rcu_head for rcu, the rcu callback should use it.

---

mm/slqb.c +1 -1
index 07bf5b3..48bdf3b 100644
@@ -1026,7 +1043,7 @@ static void rcu_free_slab(struct rcu_head *h)
 {
 	struct slqb_page *page;
 
-	page = container_of((struct list_head *)h, struct slqb_page, lru);
+	page = container_of(h, struct slqb_page, rcu_head);
 	__free_slab(page->list->cache, page);
 }