summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorZhou Zhengping <johnzzpcrystal@gmail.com>2016-06-22 01:27:25 +0800
committerVijay Bellur <vbellur@redhat.com>2016-06-23 07:33:19 -0700
commit1fdc0db572ce80d6f3a9e71d40ef272c2eb3e7e7 (patch)
tree00a6a5298573634532bd4dd4e5346e397c5d6378 /xlators
parent16c34b101f604a09a5c735fb39815c59ee4ecbdb (diff)
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 <johnzzpcrystal@gmail.com> Reviewed-on: http://review.gluster.org/14737 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/dht/src/dht-selfheal.c12
1 files changed, 5 insertions, 7 deletions
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;
}