Whamcloud - gitweb
fix issue with md_ops
authortappro <tappro>
Fri, 21 Apr 2006 15:36:58 +0000 (15:36 +0000)
committertappro <tappro>
Fri, 21 Apr 2006 15:36:58 +0000 (15:36 +0000)
lustre/obdclass/genops.c

index f8d6b51..f77ee69 100644 (file)
@@ -128,7 +128,9 @@ int class_register_type(struct obd_ops *dt_ops, struct md_ops *md_ops,
                 GOTO (failed, rc);
 
         *(type->typ_dt_ops) = *dt_ops;
-        *(type->typ_md_ops) = *md_ops;
+        /* md_ops is optional */
+        if (md_ops)
+                *(type->typ_md_ops) = *md_ops;
         strcpy(type->typ_name, name);
 
 #ifdef LPROCFS