diff options
author | Sage Weil <sage@newdream.net> | 2011-05-12 19:10:50 -0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2011-05-24 14:52:01 -0400 |
commit | 916d4d672779de8e42346fff338617c7b841e8e5 (patch) | |
tree | aa323878aa43221442b03137614f5f0a4251171c /drivers/block | |
parent | 13143d2d1cffd243a6d778000b02ab4938ac751a (diff) |
rbd: cleanup: make kfree match kmalloc
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/rbd.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 78d0011a7556..0d80967e140c 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c | |||
@@ -1602,7 +1602,7 @@ static int rbd_header_add_snap(struct rbd_device *dev, | |||
1602 | int name_len = strlen(snap_name); | 1602 | int name_len = strlen(snap_name); |
1603 | u64 new_snapid; | 1603 | u64 new_snapid; |
1604 | int ret; | 1604 | int ret; |
1605 | void *data, *data_start, *data_end; | 1605 | void *data, *p, *e; |
1606 | u64 ver; | 1606 | u64 ver; |
1607 | 1607 | ||
1608 | /* we should create a snapshot only if we're pointing at the head */ | 1608 | /* we should create a snapshot only if we're pointing at the head */ |
@@ -1619,16 +1619,16 @@ static int rbd_header_add_snap(struct rbd_device *dev, | |||
1619 | if (!data) | 1619 | if (!data) |
1620 | return -ENOMEM; | 1620 | return -ENOMEM; |
1621 | 1621 | ||
1622 | data_start = data; | 1622 | p = data; |
1623 | data_end = data + name_len + 16; | 1623 | e = data + name_len + 16; |
1624 | 1624 | ||
1625 | ceph_encode_string_safe(&data, data_end, snap_name, name_len, bad); | 1625 | ceph_encode_string_safe(&p, e, snap_name, name_len, bad); |
1626 | ceph_encode_64_safe(&data, data_end, new_snapid, bad); | 1626 | ceph_encode_64_safe(&p, e, new_snapid, bad); |
1627 | 1627 | ||
1628 | ret = rbd_req_sync_exec(dev, dev->obj_md_name, "rbd", "snap_add", | 1628 | ret = rbd_req_sync_exec(dev, dev->obj_md_name, "rbd", "snap_add", |
1629 | data_start, data - data_start, &ver); | 1629 | data, p - data, &ver); |
1630 | 1630 | ||
1631 | kfree(data_start); | 1631 | kfree(data); |
1632 | 1632 | ||
1633 | if (ret < 0) | 1633 | if (ret < 0) |
1634 | return ret; | 1634 | return ret; |