summaryrefslogtreecommitdiffstats
path: root/libglusterfsclient
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@gluster.com>2009-07-23 16:18:43 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-07-23 15:20:12 -0700
commitc2733b13aaa6d38eb165e770a936f8bfc19bc685 (patch)
treeb181366fc4ac1c2c190b66b1692c00dbeb60b9e7 /libglusterfsclient
parent2add5760c412d85f56a1ca2fc61ca743d1ee2a74 (diff)
libglusterfsclient: Fill new loc with target's ino on link
In the loc_t of the link being created, we must fill in the inode of the old/target loc since this is a link operation. The inode_link to the new parent is called in libgf_client_link. This fixes a crash while running fileop over a fully-loaded dist-repl vol file. Ref: Bugzilla 161 Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 161 (unfs3 crashes on link system call by fileop) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=161
Diffstat (limited to 'libglusterfsclient')
-rwxr-xr-xlibglusterfsclient/src/libglusterfsclient.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c
index 1cdad125af7..abdc756a42f 100755
--- a/libglusterfsclient/src/libglusterfsclient.c
+++ b/libglusterfsclient/src/libglusterfsclient.c
@@ -5402,6 +5402,7 @@ glusterfs_glh_link (glusterfs_handle_t handle, const char *oldpath,
}
newname = strdup (new.path);
+ new.inode = inode_ref (old.inode);
libgf_client_loc_fill (&new, ctx, 0, new.parent->ino,
basename (newname));
op_ret = libgf_client_link (ctx, &old, &new);