From e8282fd242ba4061a40b992ebe4549b4dd23fa11 Mon Sep 17 00:00:00 2001 From: Shehjar Tikoo Date: Tue, 7 Apr 2009 05:34:56 -0700 Subject: libglusterfsclient: Dont depend on ENOENT Dont depend on the dentry and explicit lookup function, i.e. libgf_client_path_lookup(..), to return ENOENT on not finding a dentry. Just use op_ret = -1 as a lookup failure status. Patch adapted from Raghu's original fix. Signed-off-by: Anand V. Avati --- libglusterfsclient/src/libglusterfsclient.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libglusterfsclient') diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c index e02cbdc770b..c44e67474de 100755 --- a/libglusterfsclient/src/libglusterfsclient.c +++ b/libglusterfsclient/src/libglusterfsclient.c @@ -1528,8 +1528,8 @@ glusterfs_open (glusterfs_handle_t handle, loc.path = strdup (path); op_ret = libgf_client_path_lookup (&loc, ctx, 1); - if ((op_ret == -1) && ((errno != ENOENT) - && ((flags & O_CREAT) != O_CREAT))) { + + if ((op_ret == -1) && ((flags & O_CREAT) != O_CREAT)) { gf_log ("libglusterfsclient", GF_LOG_ERROR, "path lookup failed for (%s)", path); -- cgit