From 85ed82893aca7dd6307100660b9bba0233d52240 Mon Sep 17 00:00:00 2001 From: Vikas Gorur Date: Tue, 1 Dec 2009 06:11:06 +0000 Subject: cluster/afr: Don't do memcpy of afr_local_t in afr_local_copy. For the background self-heal frame's local_t, copy only required members --- not a wholesale memcpy. The memcpy lead to pointers being copied and then double free'd. Signed-off-by: Vikas Gorur Signed-off-by: Anand V. Avati BUG: 320 (Improve self-heal performance) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=320 --- xlators/cluster/afr/src/afr-dir-read.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'xlators/cluster/afr/src/afr-dir-read.c') diff --git a/xlators/cluster/afr/src/afr-dir-read.c b/xlators/cluster/afr/src/afr-dir-read.c index 24227c33b5..fab60b66ef 100644 --- a/xlators/cluster/afr/src/afr-dir-read.c +++ b/xlators/cluster/afr/src/afr-dir-read.c @@ -59,9 +59,6 @@ afr_examine_dir_sh_unwind (call_frame_t *frame, xlator_t *this) afr_set_opendir_done (this, local->fd->inode); - /* let self-heal's local cleanup free this */ - local->cont.opendir.checksum = NULL; - AFR_STACK_UNWIND (opendir, frame, local->op_ret, local->op_errno, local->fd); @@ -153,11 +150,6 @@ out: if (__checksums_differ (local->cont.opendir.checksum, priv->child_count)) { - /* self-heal will call AFR_STACK_DESTROY and - thus unref local->fd, so ref it here */ - - local->fd = fd_ref (local->fd); - sh->need_entry_self_heal = _gf_true; sh->forced_merge = _gf_true; sh->mode = local->fd->inode->st_mode; -- cgit