aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorLai Jiangshan <laijs@cn.fujitsu.com>2011-03-17 23:42:58 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2011-07-20 17:10:13 -0400
commit57bdfbf9ee2b0856d8b62180c3b3f8fa1533b8d1 (patch)
treed39485c723d98fb3d7b2499c59232cd05f4eabc2 /block
parent8497a24a43374f0142335b0ef0614ccc459e3d8d (diff)
block,rcu: Convert call_rcu(disk_free_ptbl_rcu_cb) to kfree_rcu()
The rcu callback disk_free_ptbl_rcu_cb() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(disk_free_ptbl_rcu_cb). Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Jens Axboe <axboe@kernel.dk> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'block')
-rw-r--r--block/genhd.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/block/genhd.c b/block/genhd.c
index 3608289c8ecd..6024b82e3209 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -1018,14 +1018,6 @@ static const struct attribute_group *disk_attr_groups[] = {
1018 NULL 1018 NULL
1019}; 1019};
1020 1020
1021static void disk_free_ptbl_rcu_cb(struct rcu_head *head)
1022{
1023 struct disk_part_tbl *ptbl =
1024 container_of(head, struct disk_part_tbl, rcu_head);
1025
1026 kfree(ptbl);
1027}
1028
1029/** 1021/**
1030 * disk_replace_part_tbl - replace disk->part_tbl in RCU-safe way 1022 * disk_replace_part_tbl - replace disk->part_tbl in RCU-safe way
1031 * @disk: disk to replace part_tbl for 1023 * @disk: disk to replace part_tbl for
@@ -1046,7 +1038,7 @@ static void disk_replace_part_tbl(struct gendisk *disk,
1046 1038
1047 if (old_ptbl) { 1039 if (old_ptbl) {
1048 rcu_assign_pointer(old_ptbl->last_lookup, NULL); 1040 rcu_assign_pointer(old_ptbl->last_lookup, NULL);
1049 call_rcu(&old_ptbl->rcu_head, disk_free_ptbl_rcu_cb); 1041 kfree_rcu(old_ptbl, rcu_head);
1050 } 1042 }
1051} 1043}
1052 1044