diff options
author | Anand Avati <avati@gluster.com> | 2010-03-04 06:52:49 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-03-04 04:37:21 -0800 |
commit | 8cb697667ff3da6cd497dedeeb7f65a9992145ee (patch) | |
tree | 26ed0e42203863a1af4746dbe529598cb0f25a6a /xlators/cluster/dht/src | |
parent | 727fe837b8f7bfcdd59267f7745398934564543e (diff) |
dht: preserve and return proper pre/postparent structures during unlink
Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 689 (Segfault (11) on op UNLINK)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=689
Diffstat (limited to 'xlators/cluster/dht/src')
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index e83d9847b..6f0ab4ae5 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -1236,15 +1236,18 @@ dht_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this, preparent->st_ino = local->loc.parent->ino; postparent->st_ino = local->loc.parent->ino; local->op_ret = 0; + + local->postparent = *postparent; + local->preparent = *preparent; + + WIPE (&local->postparent); + WIPE (&local->preparent); } unlock: UNLOCK (&frame->lock); - WIPE (postparent); - WIPE (preparent); - DHT_STACK_UNWIND (unlink, frame, local->op_ret, local->op_errno, - preparent, postparent); + &local->preparent, &local->postparent); return 0; } |