From 549d1a81f49f58f842f69f64f7d152a3e6ecb0d0 Mon Sep 17 00:00:00 2001 From: Shehjar Tikoo Date: Thu, 25 Feb 2010 15:38:05 +0000 Subject: distribute: Restore parent ino from local in symlink Signed-off-by: Shehjar Tikoo Signed-off-by: Anand V. Avati BUG: 597 (miscellaneous fixes for xlators to work well with NFS xlator) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=597 --- xlators/cluster/dht/src/dht-common.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'xlators/cluster/dht') diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index fe97b728506..1c0cf682af8 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -2634,6 +2634,7 @@ dht_symlink (call_frame_t *frame, xlator_t *this, xlator_t *subvol = NULL; int op_errno = -1; dht_local_t *local = NULL; + int ret = -1; VALIDATE_OR_GOTO (frame, err); @@ -2657,6 +2658,13 @@ dht_symlink (call_frame_t *frame, xlator_t *this, goto err; } + ret = loc_copy (&local->loc, loc); + if (ret == -1) { + gf_log (this->name, GF_LOG_TRACE, "Failed to copy loc"); + op_errno = ENOMEM; + goto err; + } + gf_log (this->name, GF_LOG_TRACE, "creating %s on %s", loc->path, subvol->name); -- cgit