From 1fdc0db572ce80d6f3a9e71d40ef272c2eb3e7e7 Mon Sep 17 00:00:00 2001 From: Zhou Zhengping Date: Wed, 22 Jun 2016 01:27:25 +0800 Subject: cluster/dht: Wrong type of function's parameter when calling dht_selfheal_dir_xattr_cbk The second parameter's type is call_frame_t *, and we change it to be type xlator_t *, it is exactly what we need in this function. Change-Id: I6a154edcaa5a11084d837ca925efbfac853d0786 BUG: 1346551 Signed-off-by: Zhou Zhengping Reviewed-on: http://review.gluster.org/14737 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System Reviewed-by: Raghavendra G CentOS-regression: Gluster Build System --- xlators/cluster/dht/src/dht-selfheal.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'xlators/cluster/dht/src') diff --git a/xlators/cluster/dht/src/dht-selfheal.c b/xlators/cluster/dht/src/dht-selfheal.c index a208fdb3e1b..d3de1b76795 100644 --- a/xlators/cluster/dht/src/dht-selfheal.c +++ b/xlators/cluster/dht/src/dht-selfheal.c @@ -603,7 +603,6 @@ dht_selfheal_dir_xattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int op_ret, int op_errno, dict_t *xdata) { dht_local_t *local = NULL; - call_frame_t *prev = NULL; xlator_t *subvol = NULL; struct iatt *stbuf = NULL; int i = 0; @@ -614,8 +613,7 @@ dht_selfheal_dir_xattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this, local = frame->local; layout = local->selfheal.layout; - prev = cookie; - subvol = prev->this; + subvol = cookie; if (op_ret == 0) err = 0; @@ -637,7 +635,7 @@ dht_selfheal_dir_xattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this, LOCK (&frame->lock); { - dht_iatt_merge (this, &local->stbuf, stbuf, prev->this); + dht_iatt_merge (this, &local->stbuf, stbuf, subvol); } UNLOCK (&frame->lock); @@ -767,8 +765,8 @@ dht_selfheal_dir_xattr_persubvol (call_frame_t *frame, loc_t *loc, if (!gf_uuid_is_null (local->gfid)) gf_uuid_copy (loc->gfid, local->gfid); - STACK_WIND (frame, dht_selfheal_dir_xattr_cbk, - subvol, subvol->fops->setxattr, + STACK_WIND_COOKIE (frame, dht_selfheal_dir_xattr_cbk, + (void *) subvol, subvol, subvol->fops->setxattr, loc, xattr, 0, xdata); dict_unref (xattr); @@ -785,7 +783,7 @@ err: GF_FREE (disk_layout); - dht_selfheal_dir_xattr_cbk (frame, subvol, frame->this, + dht_selfheal_dir_xattr_cbk (frame, (void *) subvol, frame->this, -1, ENOMEM, NULL); return 0; } -- cgit