summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-selfheal.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/dht/src/dht-selfheal.c')
-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;
}