Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 211608
b: refs/heads/master
c: 28f259b
h: refs/heads/master
v: v3
  • Loading branch information
Vasiliy Kulikov authored and Sage Weil committed Oct 20, 2010
1 parent bb0a5fa commit af58281
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 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: 496e59553c51ce18acc836de070106b583926b87
refs/heads/master: 28f259b7cd78eb29d38b7ae6b475d656e08fd348
14 changes: 8 additions & 6 deletions trunk/drivers/block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ static struct rbd_client *rbd_client_create(struct ceph_options *opt)
rbdc->client = ceph_create_client(opt, rbdc);
if (IS_ERR(rbdc->client))
goto out_rbdc;
opt = NULL; /* Now rbdc->client is responsible for opt */

ret = ceph_open_session(rbdc->client);
if (ret < 0)
Expand All @@ -255,13 +256,12 @@ static struct rbd_client *rbd_client_create(struct ceph_options *opt)

out_err:
ceph_destroy_client(rbdc->client);
return ERR_PTR(ret);

out_rbdc:
kfree(rbdc);
out_opt:
ceph_destroy_options(opt);
return ERR_PTR(-ENOMEM);
if (opt)
ceph_destroy_options(opt);
return ERR_PTR(ret);
}

/*
Expand Down Expand Up @@ -889,8 +889,10 @@ static int rbd_do_op(struct request *rq,
rbd_dev->header.block_name,
ofs, len,
seg_name, &seg_ofs);
if (seg_len < 0)
return seg_len;
if ((s64)seg_len < 0) {
ret = seg_len;
goto done;
}

payload_len = (flags & CEPH_OSD_FLAG_WRITE ? seg_len : 0);

Expand Down

0 comments on commit af58281

Please sign in to comment.