From 364af2266e9cd9d1f4d88763e61a5b28d1336414 Mon Sep 17 00:00:00 2001 From: Shehjar Tikoo Date: Tue, 7 Apr 2009 05:41:50 -0700 Subject: 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 --- libglusterfsclient/src/libglusterfsclient.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c index 6dcda493201..848bda9b524 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); -- cgit