From 21f420714845eb9c60ca5d7dcc6223d1f49b8a6c Mon Sep 17 00:00:00 2001 From: tappro Date: Fri, 21 Apr 2006 15:36:58 +0000 Subject: [PATCH] fix issue with md_ops --- lustre/obdclass/genops.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c index f8d6b51..f77ee69 100644 --- a/lustre/obdclass/genops.c +++ b/lustre/obdclass/genops.c @@ -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 -- 1.8.3.1