From d1e74d7faa8670d6a7bf47ab9105af03d7dcf9a6 Mon Sep 17 00:00:00 2001 From: Shehjar Tikoo Date: Tue, 5 May 2009 15:58:03 +0530 Subject: libglusterfsclient: Dont lookup oldpath on symlink The target of the symlink does not have to be interpreted in any way. It should be sent across as it is. Signed-off-by: Anand V. Avati --- libglusterfsclient/src/libglusterfsclient.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'libglusterfsclient') diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c index 36e7b4b05..b0b226e99 100755 --- a/libglusterfsclient/src/libglusterfsclient.c +++ b/libglusterfsclient/src/libglusterfsclient.c @@ -5439,20 +5439,8 @@ glusterfs_glh_symlink (glusterfs_handle_t handle, const char *oldpath, GF_VALIDATE_OR_GOTO (LIBGF_XL_NAME, ctx, out); GF_VALIDATE_ABSOLUTE_PATH_OR_GOTO (LIBGF_XL_NAME, newpath, out); + /* Old path does not need to be interpreted or looked up */ oldloc.path = strdup (oldpath); - op_ret = libgf_client_path_lookup (&oldloc, ctx, 1); - if (op_ret == -1) { - errno = ENOENT; - goto out; - } - - oldname = strdup (oldpath); - op_ret = libgf_client_loc_fill (&oldloc, ctx, 0, oldloc.parent->ino, - basename (oldname)); - if (op_ret == -1) { - errno = EINVAL; - goto out; - } newloc.path = strdup (newpath); op_ret = libgf_client_path_lookup (&newloc, ctx, 1); -- cgit