Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359572
b: refs/heads/master
c: 935dc89
h: refs/heads/master
v: v3
  • Loading branch information
Alex Elder authored and Alex Elder committed Jan 17, 2013
1 parent be40d6a commit 17eca03
Show file tree
Hide file tree
Showing 2 changed files with 8 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: f5400b7a0e78a53edce8960a079aa022640849a1
refs/heads/master: 935dc89f3e29e2ef1d7c89778cdb9f37ff36e94b
9 changes: 7 additions & 2 deletions trunk/drivers/block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2644,8 +2644,11 @@ static int rbd_dev_probe_update_spec(struct rbd_device *rbd_dev)

osdc = &rbd_dev->rbd_client->client->osdc;
name = ceph_pg_pool_name_by_id(osdc->osdmap, rbd_dev->spec->pool_id);
if (!name)
return -EIO; /* pool id too large (>= 2^31) */
if (!name) {
rbd_warn(rbd_dev, "there is no pool with id %llu",
rbd_dev->spec->pool_id); /* Really a BUG() */
return -EIO;
}

rbd_dev->spec->pool_name = kstrdup(name, GFP_KERNEL);
if (!rbd_dev->spec->pool_name)
Expand All @@ -2663,6 +2666,8 @@ static int rbd_dev_probe_update_spec(struct rbd_device *rbd_dev)

name = rbd_snap_name(rbd_dev, rbd_dev->spec->snap_id);
if (!name) {
rbd_warn(rbd_dev, "no snapshot with id %llu",
rbd_dev->spec->snap_id); /* Really a BUG() */
ret = -EIO;
goto out_err;
}
Expand Down

0 comments on commit 17eca03

Please sign in to comment.