From 8cb697667ff3da6cd497dedeeb7f65a9992145ee Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Thu, 4 Mar 2010 06:52:49 +0000 Subject: dht: preserve and return proper pre/postparent structures during unlink Signed-off-by: Anand V. Avati Signed-off-by: Anand V. Avati BUG: 689 (Segfault (11) on op UNLINK) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=689 --- xlators/cluster/dht/src/dht-common.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'xlators') diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index e83d9847b09..6f0ab4ae572 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; } -- cgit