Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 376937
b: refs/heads/master
c: 3abef3b
h: refs/heads/master
i:
  376935: 0e1f0ce
v: v3
  • Loading branch information
Alex Elder committed May 17, 2013
1 parent fa4c040 commit 004ce44
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 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: 7262cfca430a1a0e0707149af29ae86bc0ded230
refs/heads/master: 3abef3b3585bbc67d56fdc9c67761a900fb4b69d
23 changes: 14 additions & 9 deletions trunk/drivers/block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -4700,8 +4700,10 @@ static int rbd_dev_image_id(struct rbd_device *rbd_dev)
return ret;
}

/* Undo whatever state changes are made by v1 or v2 image probe */

/*
* Undo whatever state changes are made by v1 or v2 header info
* call.
*/
static void rbd_dev_unprobe(struct rbd_device *rbd_dev)
{
struct rbd_image_header *header;
Expand Down Expand Up @@ -4905,9 +4907,10 @@ static int rbd_dev_image_probe(struct rbd_device *rbd_dev, bool mapping)
int tmp;

/*
* Get the id from the image id object. If it's not a
* format 2 image, we'll get ENOENT back, and we'll assume
* it's a format 1 image.
* Get the id from the image id object. Unless there's an
* error, rbd_dev->spec->image_id will be filled in with
* a dynamically-allocated string, and rbd_dev->image_format
* will be set to either 1 or 2.
*/
ret = rbd_dev_image_id(rbd_dev);
if (ret)
Expand Down Expand Up @@ -5029,16 +5032,18 @@ static ssize_t rbd_add(struct bus_type *bus,
rbd_dev->mapping.read_only = read_only;

rc = rbd_dev_device_setup(rbd_dev);
if (!rc)
return count;
if (rc) {
rbd_dev_image_release(rbd_dev);
goto err_out_module;
}

return count;

rbd_dev_image_release(rbd_dev);
err_out_rbd_dev:
rbd_dev_destroy(rbd_dev);
err_out_client:
rbd_put_client(rbdc);
err_out_args:
kfree(rbd_opts);
rbd_spec_put(spec);
err_out_module:
module_put(THIS_MODULE);
Expand Down

0 comments on commit 004ce44

Please sign in to comment.