diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-10 14:12:55 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-10 14:13:53 -0500 |
commit | 7483948fdd31a8642ef0288aab6f368b98d53c29 (patch) | |
tree | 031020a5553701d2aae8dddb0fa509aa65854eb1 /drivers/block | |
parent | 22a416c4e0f2179b57028e084ac0ed2c110333bd (diff) | |
parent | fe250923bbbbcbccc9aa7b84d05ee7a060450534 (diff) |
Merge tag 'usb-3.3-rc3' into usb-next
This is done to resolve a merge conflict with:
drivers/usb/class/cdc-wdm.c
and to better handle future patches for this driver as it is under
active development at the moment.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/rbd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 3fd31dec8c9c..a6278e7e61a0 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c | |||
@@ -380,6 +380,7 @@ static int rbd_get_client(struct rbd_device *rbd_dev, const char *mon_addr, | |||
380 | rbdc = __rbd_client_find(opt); | 380 | rbdc = __rbd_client_find(opt); |
381 | if (rbdc) { | 381 | if (rbdc) { |
382 | ceph_destroy_options(opt); | 382 | ceph_destroy_options(opt); |
383 | kfree(rbd_opts); | ||
383 | 384 | ||
384 | /* using an existing client */ | 385 | /* using an existing client */ |
385 | kref_get(&rbdc->kref); | 386 | kref_get(&rbdc->kref); |
@@ -406,15 +407,15 @@ done_err: | |||
406 | 407 | ||
407 | /* | 408 | /* |
408 | * Destroy ceph client | 409 | * Destroy ceph client |
410 | * | ||
411 | * Caller must hold node_lock. | ||
409 | */ | 412 | */ |
410 | static void rbd_client_release(struct kref *kref) | 413 | static void rbd_client_release(struct kref *kref) |
411 | { | 414 | { |
412 | struct rbd_client *rbdc = container_of(kref, struct rbd_client, kref); | 415 | struct rbd_client *rbdc = container_of(kref, struct rbd_client, kref); |
413 | 416 | ||
414 | dout("rbd_release_client %p\n", rbdc); | 417 | dout("rbd_release_client %p\n", rbdc); |
415 | spin_lock(&node_lock); | ||
416 | list_del(&rbdc->node); | 418 | list_del(&rbdc->node); |
417 | spin_unlock(&node_lock); | ||
418 | 419 | ||
419 | ceph_destroy_client(rbdc->client); | 420 | ceph_destroy_client(rbdc->client); |
420 | kfree(rbdc->rbd_opts); | 421 | kfree(rbdc->rbd_opts); |
@@ -427,7 +428,9 @@ static void rbd_client_release(struct kref *kref) | |||
427 | */ | 428 | */ |
428 | static void rbd_put_client(struct rbd_device *rbd_dev) | 429 | static void rbd_put_client(struct rbd_device *rbd_dev) |
429 | { | 430 | { |
431 | spin_lock(&node_lock); | ||
430 | kref_put(&rbd_dev->rbd_client->kref, rbd_client_release); | 432 | kref_put(&rbd_dev->rbd_client->kref, rbd_client_release); |
433 | spin_unlock(&node_lock); | ||
431 | rbd_dev->rbd_client = NULL; | 434 | rbd_dev->rbd_client = NULL; |
432 | rbd_dev->client = NULL; | 435 | rbd_dev->client = NULL; |
433 | } | 436 | } |