Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287165
b: refs/heads/master
c: d23a4b3
h: refs/heads/master
i:
  287163: 20f5b15
v: v3
  • Loading branch information
Alex Elder authored and Sage Weil committed Feb 2, 2012
1 parent 63f89ff commit 2db9c21
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 97bb59a03dd6767fcc00be09b0c6d9e5294eeea6
refs/heads/master: d23a4b3fd6ef70b80411b39b8c8bc548a219ce70
6 changes: 4 additions & 2 deletions trunk/drivers/block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,15 +407,15 @@ static int rbd_get_client(struct rbd_device *rbd_dev, const char *mon_addr,

/*
* Destroy ceph client
*
* Caller must hold node_lock.
*/
static void rbd_client_release(struct kref *kref)
{
struct rbd_client *rbdc = container_of(kref, struct rbd_client, kref);

dout("rbd_release_client %p\n", rbdc);
spin_lock(&node_lock);
list_del(&rbdc->node);
spin_unlock(&node_lock);

ceph_destroy_client(rbdc->client);
kfree(rbdc->rbd_opts);
Expand All @@ -428,7 +428,9 @@ static void rbd_client_release(struct kref *kref)
*/
static void rbd_put_client(struct rbd_device *rbd_dev)
{
spin_lock(&node_lock);
kref_put(&rbd_dev->rbd_client->kref, rbd_client_release);
spin_unlock(&node_lock);
rbd_dev->rbd_client = NULL;
rbd_dev->client = NULL;
}
Expand Down

0 comments on commit 2db9c21

Please sign in to comment.