From cc1728766620e13ccfe2cd0b162cbc848b20e422 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Thu, 26 Dec 2013 11:31:49 +0530 Subject: cluster/afr: Treat ESTALE on nameless lookup as ENOENT Change-Id: I635fc0fa955b33590f1c5b4dfec22d591ea8575c BUG: 1032894 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/6593 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/cluster/afr/src/afr-common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'xlators/cluster/afr/src') diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index af01f2ef28b..acb6bc0e86a 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -2184,7 +2184,9 @@ afr_resultant_errno_get (int32_t *children, static void afr_lookup_handle_error (afr_local_t *local, int32_t op_ret, int32_t op_errno) { - GF_ASSERT (local); + if ((local->loc.name == NULL) && (op_errno == ESTALE)) + op_errno = ENOENT; + if (op_errno == ENOENT) local->enoent_count++; -- cgit