path: root/libglusterfsclient/src/libglusterfsclient.c
diff options
authorShehjar Tikoo <>2009-07-23 16:18:43 +0000
committerAnand V. Avati <>2009-07-23 15:20:12 -0700
commitc2733b13aaa6d38eb165e770a936f8bfc19bc685 (patch)
treeb181366fc4ac1c2c190b66b1692c00dbeb60b9e7 /libglusterfsclient/src/libglusterfsclient.c
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 <> BUG: 161 (unfs3 crashes on link system call by fileop) URL:
Diffstat (limited to 'libglusterfsclient/src/libglusterfsclient.c')
1 files changed, 1 insertions, 0 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c
index 1cdad12..abdc756 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);