Whamcloud - gitweb
LU-1155 obdecho: Oops if target device can not be found.
authorwangdi <di.wang@whamcloud.com>
Thu, 1 Mar 2012 00:32:23 +0000 (16:32 -0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 8 Mar 2012 02:28:02 +0000 (21:28 -0500)
Missing setting error value if target device can not be found,
which will cause Oops in some cases.

Signed-off-by: Wang Di <di.wang@whamcloud.com>
Change-Id: I5fc7cd376c8c7c276739692c7234ae142b4f6e23
Reviewed-on: http://review.whamcloud.com/2229
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/obdecho/echo_client.c

index 67b746c..ea9f293 100644 (file)
@@ -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;