Whamcloud - gitweb
if the connection fails for whatever reason and we pass an invalid
authorphil <phil>
Thu, 21 Aug 2003 06:40:50 +0000 (06:40 +0000)
committerphil <phil>
Thu, 21 Aug 2003 06:40:50 +0000 (06:40 +0000)
export handle into oscc_init, don't dereference a NULL

lustre/osc/osc_create.c

index 84af0dc..d683ff5 100644 (file)
@@ -267,8 +267,12 @@ static int osccd_main(void *arg)
 void oscc_init(struct lustre_handle *exph)
 {
         struct obd_export *exp = class_conn2export(exph);
-        struct osc_export_data *oed = &exp->exp_osc_data;
+        struct osc_export_data *oed;
 
+        if (exp == NULL)
+                return;
+
+        oed = &exp->exp_osc_data;
         memset(oed, 0, sizeof(*oed));
         INIT_LIST_HEAD(&oed->oed_oscc.oscc_list);
         init_waitqueue_head(&oed->oed_oscc.oscc_waitq);