From 7d6e73d4421265a304fd22964649e555a2db8097 Mon Sep 17 00:00:00 2001 From: Vikas Gorur Date: Tue, 13 Oct 2009 06:42:13 +0000 Subject: posix/client/server: Send postparent in lookup even if lookup fails on the entry itself. Signed-off-by: Anand V. Avati 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 --- xlators/storage/posix/src/posix.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'xlators/storage/posix/src') diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index fa70dd274..6f9886af4 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); -- cgit