diff options
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/rbd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 013c7a549fb6..c1f770131654 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c | |||
@@ -450,7 +450,9 @@ static void rbd_client_release(struct kref *kref) | |||
450 | struct rbd_client *rbdc = container_of(kref, struct rbd_client, kref); | 450 | struct rbd_client *rbdc = container_of(kref, struct rbd_client, kref); |
451 | 451 | ||
452 | dout("rbd_release_client %p\n", rbdc); | 452 | dout("rbd_release_client %p\n", rbdc); |
453 | spin_lock(&rbd_client_list_lock); | ||
453 | list_del(&rbdc->node); | 454 | list_del(&rbdc->node); |
455 | spin_unlock(&rbd_client_list_lock); | ||
454 | 456 | ||
455 | ceph_destroy_client(rbdc->client); | 457 | ceph_destroy_client(rbdc->client); |
456 | kfree(rbdc->rbd_opts); | 458 | kfree(rbdc->rbd_opts); |
@@ -463,9 +465,7 @@ static void rbd_client_release(struct kref *kref) | |||
463 | */ | 465 | */ |
464 | static void rbd_put_client(struct rbd_device *rbd_dev) | 466 | static void rbd_put_client(struct rbd_device *rbd_dev) |
465 | { | 467 | { |
466 | spin_lock(&rbd_client_list_lock); | ||
467 | kref_put(&rbd_dev->rbd_client->kref, rbd_client_release); | 468 | kref_put(&rbd_dev->rbd_client->kref, rbd_client_release); |
468 | spin_unlock(&rbd_client_list_lock); | ||
469 | rbd_dev->rbd_client = NULL; | 469 | rbd_dev->rbd_client = NULL; |
470 | } | 470 | } |
471 | 471 | ||