Skip to content

Commit

Permalink
rbd: pass null version pointer in add_snap()
Browse files Browse the repository at this point in the history
rbd_header_add_snap() passes the address of a version variable to
rbd_req_sync_exec(), but it ignores the result.  Just pass a null
pointer instead.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
  • Loading branch information
Alex Elder authored and Sage Weil committed Jul 31, 2012
1 parent 57cfc10 commit d67d4be
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1668,7 +1668,6 @@ static int rbd_header_add_snap(struct rbd_device *rbd_dev,
u64 new_snapid;
int ret;
void *data, *p, *e;
u64 ver;
struct ceph_mon_client *monc;

/* we should create a snapshot only if we're pointing at the head */
Expand All @@ -1693,7 +1692,7 @@ static int rbd_header_add_snap(struct rbd_device *rbd_dev,

ret = rbd_req_sync_exec(rbd_dev, rbd_dev->header_name,
"rbd", "snap_add",
data, p - data, &ver);
data, p - data, NULL);

kfree(data);

Expand Down

0 comments on commit d67d4be

Please sign in to comment.