summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-linkfile.c
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-09-23 06:30:43 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-23 07:51:06 -0700
commitfa3ca3c61fbd7ad95f57f0522624396b8f05ecf6 (patch)
tree56a7c29fc49401544d8c9ac74cb213d36ed83347 /xlators/cluster/dht/src/dht-linkfile.c
parenta2e35ea0166c42435f860990c9476dda470843c8 (diff)
distribute: don't update the inode's gfid directly
Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1680 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1680
Diffstat (limited to 'xlators/cluster/dht/src/dht-linkfile.c')
-rw-r--r--xlators/cluster/dht/src/dht-linkfile.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/xlators/cluster/dht/src/dht-linkfile.c b/xlators/cluster/dht/src/dht-linkfile.c
index fa84ea29e..23f3a8804 100644
--- a/xlators/cluster/dht/src/dht-linkfile.c
+++ b/xlators/cluster/dht/src/dht-linkfile.c
@@ -123,21 +123,27 @@ dht_linkfile_create (call_frame_t *frame, fop_mknod_cbk_t linkfile_cbk,
local->linkfile.srcvol = tovol;
loc_copy (&local->linkfile.loc, loc);
- if (!uuid_is_null (loc->inode->gfid)) {
+ if (!uuid_is_null (local->gfid)) {
dict = dict_new ();
if (!dict)
goto out;
- ret = dict_set_static_bin (dict, "gfid-req", loc->inode->gfid, 16);
+ ret = dict_set_static_bin (dict, "gfid-req", local->gfid, 16);
if (ret)
gf_log ("dht-linkfile", GF_LOG_DEBUG, "gfid set failed");
} else if (local->params) {
dict = dict_ref (local->params);
}
+ if (!dict)
+ gf_log ("", GF_LOG_DEBUG,
+ "dict is NULL, need to make sure gfid's are same");
STACK_WIND (frame, dht_linkfile_create_cbk,
fromvol, fromvol->fops->mknod, loc,
S_IFREG | DHT_LINKFILE_MODE, 0, dict);
+ if (dict)
+ dict_unref (dict);
+
return 0;
out:
local->linkfile.linkfile_cbk (frame, NULL, frame->this, -1, ENOMEM,