From: wangdi Date: Thu, 1 Mar 2012 00:32:23 +0000 (-0800) Subject: LU-1155 obdecho: Oops if target device can not be found. X-Git-Tag: 2.2.51~65 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=4256314250be97ea76f35100c4332acd17839da9;p=fs%2Flustre-release.git LU-1155 obdecho: Oops if target device can not be found. Missing setting error value if target device can not be found, which will cause Oops in some cases. Signed-off-by: Wang Di Change-Id: I5fc7cd376c8c7c276739692c7234ae142b4f6e23 Reviewed-on: http://review.whamcloud.com/2229 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/obdecho/echo_client.c b/lustre/obdecho/echo_client.c index 67b746c..ea9f293 100644 --- a/lustre/obdecho/echo_client.c +++ b/lustre/obdecho/echo_client.c @@ -783,7 +783,7 @@ static struct lu_device *echo_device_alloc(const struct lu_env *env, if (tgt == NULL) { CERROR("Can not find tgt device %s\n", lustre_cfg_string(cfg, 1)); - GOTO(out, rc); + GOTO(out, rc = -ENODEV); } next = tgt->obd_lu_dev;