Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 373499
b: refs/heads/master
c: ecb4dc2
h: refs/heads/master
i:
  373497: f207303
  373495: 454155b
v: v3
  • Loading branch information
Alex Elder authored and Sage Weil committed May 2, 2013
1 parent c087c8d commit 4684e65
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 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: e1d4213f090644b06aab6ea70e307ecf16182148
refs/heads/master: ecb4dc225612e1c0b28d2c1b168422dde4f442a6
16 changes: 9 additions & 7 deletions trunk/drivers/block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,13 @@ struct rbd_image_header {
*/
struct rbd_spec {
u64 pool_id;
char *pool_name;
const char *pool_name;

char *image_id;
char *image_name;
const char *image_id;
const char *image_name;

u64 snap_id;
char *snap_name;
const char *snap_name;

struct kref kref;
};
Expand Down Expand Up @@ -4375,6 +4375,7 @@ static int rbd_add_parse_args(const char *buf,
size_t len;
char *options;
const char *mon_addrs;
char *snap_name;
size_t mon_addrs_size;
struct rbd_spec *spec = NULL;
struct rbd_options *rbd_opts = NULL;
Expand Down Expand Up @@ -4433,10 +4434,11 @@ static int rbd_add_parse_args(const char *buf,
ret = -ENAMETOOLONG;
goto out_err;
}
spec->snap_name = kmemdup(buf, len + 1, GFP_KERNEL);
if (!spec->snap_name)
snap_name = kmemdup(buf, len + 1, GFP_KERNEL);
if (!snap_name)
goto out_mem;
*(spec->snap_name + len) = '\0';
*(snap_name + len) = '\0';
spec->snap_name = snap_name;

/* Initialize all rbd options to the defaults */

Expand Down

0 comments on commit 4684e65

Please sign in to comment.