diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-22 19:44:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-22 19:44:08 -0400 |
commit | 0342cbcfced2ee937d7c8e1c63f3d3082da7c7dc (patch) | |
tree | fb98291d321a50de2dfd99f9bcaa33274f0c3952 /drivers | |
parent | 391d6276db9fbdedfbc30e1b56390414f0e55988 (diff) | |
parent | 7f70893173b056df691b2ee7546bb44fd9abae6a (diff) |
Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
rcu: Fix wrong check in list_splice_init_rcu()
net,rcu: Convert call_rcu(xt_rateest_free_rcu) to kfree_rcu()
sysctl,rcu: Convert call_rcu(free_head) to kfree
vmalloc,rcu: Convert call_rcu(rcu_free_vb) to kfree_rcu()
vmalloc,rcu: Convert call_rcu(rcu_free_va) to kfree_rcu()
ipc,rcu: Convert call_rcu(ipc_immediate_free) to kfree_rcu()
ipc,rcu: Convert call_rcu(free_un) to kfree_rcu()
security,rcu: Convert call_rcu(sel_netport_free) to kfree_rcu()
security,rcu: Convert call_rcu(sel_netnode_free) to kfree_rcu()
ia64,rcu: Convert call_rcu(sn_irq_info_free) to kfree_rcu()
block,rcu: Convert call_rcu(disk_free_ptbl_rcu_cb) to kfree_rcu()
scsi,rcu: Convert call_rcu(fc_rport_free_rcu) to kfree_rcu()
audit_tree,rcu: Convert call_rcu(__put_tree) to kfree_rcu()
security,rcu: Convert call_rcu(whitelist_item_free) to kfree_rcu()
md,rcu: Convert call_rcu(free_conf) to kfree_rcu()
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/linear.c | 8 | ||||
-rw-r--r-- | drivers/scsi/libfc/fc_rport.c | 14 |
2 files changed, 2 insertions, 20 deletions
diff --git a/drivers/md/linear.c b/drivers/md/linear.c index abfb59a61ede..6cd2c313e800 100644 --- a/drivers/md/linear.c +++ b/drivers/md/linear.c | |||
@@ -213,12 +213,6 @@ static int linear_run (mddev_t *mddev) | |||
213 | return md_integrity_register(mddev); | 213 | return md_integrity_register(mddev); |
214 | } | 214 | } |
215 | 215 | ||
216 | static void free_conf(struct rcu_head *head) | ||
217 | { | ||
218 | linear_conf_t *conf = container_of(head, linear_conf_t, rcu); | ||
219 | kfree(conf); | ||
220 | } | ||
221 | |||
222 | static int linear_add(mddev_t *mddev, mdk_rdev_t *rdev) | 216 | static int linear_add(mddev_t *mddev, mdk_rdev_t *rdev) |
223 | { | 217 | { |
224 | /* Adding a drive to a linear array allows the array to grow. | 218 | /* Adding a drive to a linear array allows the array to grow. |
@@ -247,7 +241,7 @@ static int linear_add(mddev_t *mddev, mdk_rdev_t *rdev) | |||
247 | md_set_array_sectors(mddev, linear_size(mddev, 0, 0)); | 241 | md_set_array_sectors(mddev, linear_size(mddev, 0, 0)); |
248 | set_capacity(mddev->gendisk, mddev->array_sectors); | 242 | set_capacity(mddev->gendisk, mddev->array_sectors); |
249 | revalidate_disk(mddev->gendisk); | 243 | revalidate_disk(mddev->gendisk); |
250 | call_rcu(&oldconf->rcu, free_conf); | 244 | kfree_rcu(oldconf, rcu); |
251 | return 0; | 245 | return 0; |
252 | } | 246 | } |
253 | 247 | ||
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c index 49e1ccca09d5..01e13a2eb93a 100644 --- a/drivers/scsi/libfc/fc_rport.c +++ b/drivers/scsi/libfc/fc_rport.c | |||
@@ -153,18 +153,6 @@ static struct fc_rport_priv *fc_rport_create(struct fc_lport *lport, | |||
153 | } | 153 | } |
154 | 154 | ||
155 | /** | 155 | /** |
156 | * fc_rport_free_rcu() - Free a remote port | ||
157 | * @rcu: The rcu_head structure inside the remote port | ||
158 | */ | ||
159 | static void fc_rport_free_rcu(struct rcu_head *rcu) | ||
160 | { | ||
161 | struct fc_rport_priv *rdata; | ||
162 | |||
163 | rdata = container_of(rcu, struct fc_rport_priv, rcu); | ||
164 | kfree(rdata); | ||
165 | } | ||
166 | |||
167 | /** | ||
168 | * fc_rport_destroy() - Free a remote port after last reference is released | 156 | * fc_rport_destroy() - Free a remote port after last reference is released |
169 | * @kref: The remote port's kref | 157 | * @kref: The remote port's kref |
170 | */ | 158 | */ |
@@ -173,7 +161,7 @@ static void fc_rport_destroy(struct kref *kref) | |||
173 | struct fc_rport_priv *rdata; | 161 | struct fc_rport_priv *rdata; |
174 | 162 | ||
175 | rdata = container_of(kref, struct fc_rport_priv, kref); | 163 | rdata = container_of(kref, struct fc_rport_priv, kref); |
176 | call_rcu(&rdata->rcu, fc_rport_free_rcu); | 164 | kfree_rcu(rdata, rcu); |
177 | } | 165 | } |
178 | 166 | ||
179 | /** | 167 | /** |