diff options
author | Shehjar Tikoo <shehjart@zresearch.com> | 2009-04-07 05:34:56 -0700 |
---|---|---|
committer | Anand V. Avati <avati@amp.gluster.com> | 2009-04-08 15:05:44 +0530 |
commit | e8282fd242ba4061a40b992ebe4549b4dd23fa11 (patch) | |
tree | 23817aa795199dfae5ee715db0d5d0bb7005bbb4 /libglusterfsclient | |
parent | ccbb9c7df1d887bc835a04e0f76799770ba3e2b8 (diff) |
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 <avati@amp.gluster.com>
Diffstat (limited to 'libglusterfsclient')
-rwxr-xr-x | libglusterfsclient/src/libglusterfsclient.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); |