From 6e12003b950c163df02e63026aefcc60e12892e2 Mon Sep 17 00:00:00 2001 From: James Simmons Date: Mon, 8 Oct 2012 14:45:39 -0400 Subject: [PATCH] LU-2111 echo_cleint: Wrong error code returns for MDS echo If MD echo client fails to resolve a path a error is returned by PTR_ERR but the rc variable is never updated with this value to return back thus the application thinks it worked. This patch properly sets the returned rc variable to let the application testing know a failure has occured. Signed-off-by: James Simmons Change-Id: If7d2e9fbb28bcb239f7cc5021efebdcf0784ea14 Reviewed-on: http://review.whamcloud.com/4225 Tested-by: Hudson Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Liang Zhen Reviewed-by: Oleg Drokin --- lustre/obdecho/echo_client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/obdecho/echo_client.c b/lustre/obdecho/echo_client.c index f1901d8..b33ad4b 100644 --- a/lustre/obdecho/echo_client.c +++ b/lustre/obdecho/echo_client.c @@ -2136,7 +2136,7 @@ static int echo_md_handler(struct echo_device *ed, int command, if (IS_ERR(parent)) { CERROR("Can not resolve the path %s: rc = %ld\n", path, PTR_ERR(parent)); - GOTO(out_free, PTR_ERR(parent)); + GOTO(out_free, rc = PTR_ERR(parent)); } if (namelen > 0) { -- 1.8.3.1