diff options
author | Shehjar Tikoo <shehjart@zresearch.com> | 2009-04-07 05:41:50 -0700 |
---|---|---|
committer | Anand V. Avati <avati@amp.gluster.com> | 2009-04-08 15:06:04 +0530 |
commit | 364af2266e9cd9d1f4d88763e61a5b28d1336414 (patch) | |
tree | d1392eacca093ea325d3647dab734f4d13959f9e | |
parent | 353f30ad17c9ace576df47abedf71054d8eb434e (diff) |
libglusterfsclient: Return ENOENT on missing ancestor component
If any of the path's components, except the basename, are missing
from the dentry cache and the corresponding lookup from the server
also fails, return an ENOENT.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
-rwxr-xr-x | libglusterfsclient/src/libglusterfsclient.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c index 6dcda4932..848bda9b5 100755 --- a/libglusterfsclient/src/libglusterfsclient.c +++ b/libglusterfsclient/src/libglusterfsclient.c @@ -3369,6 +3369,12 @@ glusterfs_mkdir (glusterfs_handle_t handle, goto out; } + op_ret = libgf_client_path_lookup (&loc, ctx, 0); + if (op_ret == -1) { + errno = ENOENT; + goto out; + } + pathname = strdup (path); name = basename (pathname); |