summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix/src
diff options
context:
space:
mode:
authorVikas Gorur <vikas@gluster.com>2009-10-13 06:42:13 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-10-13 06:23:03 -0700
commit7d6e73d4421265a304fd22964649e555a2db8097 (patch)
tree34010785707512f3cdd6d57d33d1baf77a10682b /xlators/storage/posix/src
parentf085beebd03b2c8be2fa57039ad3cbcb6eaa66d3 (diff)
posix/client/server: Send postparent in lookup even if lookup fails on the entry itself.
Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 137 (Parent directory mtime not reset after a create in self-heal) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=137
Diffstat (limited to 'xlators/storage/posix/src')
-rw-r--r--xlators/storage/posix/src/posix.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index fa70dd274fb..6f9886af489 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -306,6 +306,7 @@ posix_lookup (call_frame_t *frame, xlator_t *this,
struct stat buf = {0, };
char * real_path = NULL;
int32_t op_ret = -1;
+ int32_t entry_ret = 0;
int32_t op_errno = 0;
dict_t * xattr = NULL;
char * pathdup = NULL;
@@ -331,7 +332,9 @@ posix_lookup (call_frame_t *frame, xlator_t *this,
"lstat on %s failed: %s",
loc->path, strerror (op_errno));
}
- goto out;
+
+ entry_ret = -1;
+ goto parent;
}
/* Make sure we don't access another mountpoint inside export dir.
@@ -362,6 +365,7 @@ posix_lookup (call_frame_t *frame, xlator_t *this,
xattr_req, &buf);
}
+parent:
pathdup = strdup (real_path);
GF_VALIDATE_OR_GOTO (this->name, pathdup, out);
@@ -376,7 +380,7 @@ posix_lookup (call_frame_t *frame, xlator_t *this,
goto out;
}
- op_ret = 0;
+ op_ret = entry_ret;
out:
if (pathdup)
FREE (pathdup);