diff options
| -rw-r--r-- | drivers/block/rbd.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 6b872f219774..5f64ba77bc7f 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c | |||
| @@ -521,8 +521,8 @@ static const struct block_device_operations rbd_bd_ops = { | |||
| 521 | }; | 521 | }; |
| 522 | 522 | ||
| 523 | /* | 523 | /* |
| 524 | * Initialize an rbd client instance. | 524 | * Initialize an rbd client instance. Success or not, this function |
| 525 | * We own *ceph_opts. | 525 | * consumes ceph_opts. |
| 526 | */ | 526 | */ |
| 527 | static struct rbd_client *rbd_client_create(struct ceph_options *ceph_opts) | 527 | static struct rbd_client *rbd_client_create(struct ceph_options *ceph_opts) |
| 528 | { | 528 | { |
| @@ -677,7 +677,8 @@ static int parse_rbd_opts_token(char *c, void *private) | |||
| 677 | 677 | ||
| 678 | /* | 678 | /* |
| 679 | * Get a ceph client with specific addr and configuration, if one does | 679 | * Get a ceph client with specific addr and configuration, if one does |
| 680 | * not exist create it. | 680 | * not exist create it. Either way, ceph_opts is consumed by this |
| 681 | * function. | ||
| 681 | */ | 682 | */ |
| 682 | static struct rbd_client *rbd_get_client(struct ceph_options *ceph_opts) | 683 | static struct rbd_client *rbd_get_client(struct ceph_options *ceph_opts) |
| 683 | { | 684 | { |
| @@ -4994,7 +4995,6 @@ static ssize_t rbd_add(struct bus_type *bus, | |||
| 4994 | rc = PTR_ERR(rbdc); | 4995 | rc = PTR_ERR(rbdc); |
| 4995 | goto err_out_args; | 4996 | goto err_out_args; |
| 4996 | } | 4997 | } |
| 4997 | ceph_opts = NULL; /* rbd_dev client now owns this */ | ||
| 4998 | 4998 | ||
| 4999 | /* pick the pool */ | 4999 | /* pick the pool */ |
| 5000 | osdc = &rbdc->client->osdc; | 5000 | osdc = &rbdc->client->osdc; |
| @@ -5038,8 +5038,6 @@ err_out_rbd_dev: | |||
| 5038 | err_out_client: | 5038 | err_out_client: |
| 5039 | rbd_put_client(rbdc); | 5039 | rbd_put_client(rbdc); |
| 5040 | err_out_args: | 5040 | err_out_args: |
| 5041 | if (ceph_opts) | ||
| 5042 | ceph_destroy_options(ceph_opts); | ||
| 5043 | kfree(rbd_opts); | 5041 | kfree(rbd_opts); |
| 5044 | rbd_spec_put(spec); | 5042 | rbd_spec_put(spec); |
| 5045 | err_out_module: | 5043 | err_out_module: |
