summaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2011-05-12 16:10:50 -0700
committerSage Weil <sage@newdream.net>2011-05-24 11:52:01 -0700
commit916d4d672779de8e42346fff338617c7b841e8e5 (patch)
treeaa323878aa43221442b03137614f5f0a4251171c /drivers/block
parent13143d2d1cffd243a6d778000b02ab4938ac751a (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.c14
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,
int name_len = strlen(snap_name);
u64 new_snapid;
int ret;
- void *data, *data_start, *data_end;
+ void *data, *p, *e;
u64 ver;
/* 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,
if (!data)
return -ENOMEM;
- data_start = data;
- data_end = data + name_len + 16;
+ p = data;
+ e = data + name_len + 16;
- ceph_encode_string_safe(&data, data_end, snap_name, name_len, bad);
- ceph_encode_64_safe(&data, data_end, new_snapid, bad);
+ ceph_encode_string_safe(&p, e, snap_name, name_len, bad);
+ ceph_encode_64_safe(&p, e, new_snapid, bad);
ret = rbd_req_sync_exec(dev, dev->obj_md_name, "rbd", "snap_add",
- data_start, data - data_start, &ver);
+ data, p - data, &ver);
- kfree(data_start);
+ kfree(data);
if (ret < 0)
return ret;