Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 331668
b: refs/heads/master
c: 5ed1617
h: refs/heads/master
v: v3
  • Loading branch information
Alex Elder committed Oct 1, 2012
1 parent 2ef40f1 commit ddfd395
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 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: 304f68086f8206da7c5930a9cb0207c91d1983a6
refs/heads/master: 5ed1617731a1e9201c3541a9c05ce3ec73975589
7 changes: 4 additions & 3 deletions trunk/drivers/block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ static int snap_by_name(struct rbd_device *rbd_dev, const char *snap_name)
return -ENOENT;
}

static int rbd_header_set_snap(struct rbd_device *rbd_dev, char *snap_name)
static int rbd_dev_set_mapping(struct rbd_device *rbd_dev, char *snap_name)
{
int ret;

Expand Down Expand Up @@ -2625,12 +2625,13 @@ static ssize_t rbd_add(struct bus_type *bus,
rc = rbd_dev_snaps_update(rbd_dev);
if (rc)
goto err_out_bus;
rc = rbd_dev_snaps_register(rbd_dev);

rc = rbd_dev_set_mapping(rbd_dev, snap_name);
if (rc)
goto err_out_bus;

down_write(&rbd_dev->header_rwsem);
rc = rbd_header_set_snap(rbd_dev, snap_name);
rc = rbd_dev_snaps_register(rbd_dev);
up_write(&rbd_dev->header_rwsem);
if (rc)
goto err_out_bus;
Expand Down

0 comments on commit ddfd395

Please sign in to comment.