Commit 8cc420d0 authored by Peng Tao's avatar Peng Tao Committed by Greg Kroah-Hartman

staging/lustre/obdclass: lprocfs_{alloc_stats,register} always defined

No need to surround them with #ifdef LPROCFS.
Signed-off-by: default avatarPeng Tao <bergwolf@gmail.com>
Signed-off-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 52ee5b56
...@@ -516,7 +516,7 @@ static int __init init_obdclass(void) ...@@ -516,7 +516,7 @@ static int __init init_obdclass(void)
spin_lock_init(&obd_types_lock); spin_lock_init(&obd_types_lock);
obd_zombie_impexp_init(); obd_zombie_impexp_init();
#ifdef LPROCFS
obd_memory = lprocfs_alloc_stats(OBD_STATS_NUM, obd_memory = lprocfs_alloc_stats(OBD_STATS_NUM,
LPROCFS_STATS_FLAG_NONE | LPROCFS_STATS_FLAG_NONE |
LPROCFS_STATS_FLAG_IRQ_SAFE); LPROCFS_STATS_FLAG_IRQ_SAFE);
...@@ -531,7 +531,7 @@ static int __init init_obdclass(void) ...@@ -531,7 +531,7 @@ static int __init init_obdclass(void)
lprocfs_counter_init(obd_memory, OBD_MEMORY_PAGES_STAT, lprocfs_counter_init(obd_memory, OBD_MEMORY_PAGES_STAT,
LPROCFS_CNTR_AVGMINMAX, LPROCFS_CNTR_AVGMINMAX,
"pagesused", "pages"); "pagesused", "pages");
#endif
err = obd_init_checks(); err = obd_init_checks();
if (err == -EOVERFLOW) if (err == -EOVERFLOW)
return err; return err;
......
...@@ -193,7 +193,6 @@ int class_register_type(struct obd_ops *dt_ops, struct md_ops *md_ops, ...@@ -193,7 +193,6 @@ int class_register_type(struct obd_ops *dt_ops, struct md_ops *md_ops,
strcpy(type->typ_name, name); strcpy(type->typ_name, name);
spin_lock_init(&type->obd_type_lock); spin_lock_init(&type->obd_type_lock);
#ifdef LPROCFS
type->typ_procroot = lprocfs_register(type->typ_name, proc_lustre_root, type->typ_procroot = lprocfs_register(type->typ_name, proc_lustre_root,
vars, type); vars, type);
if (IS_ERR(type->typ_procroot)) { if (IS_ERR(type->typ_procroot)) {
...@@ -201,7 +200,7 @@ int class_register_type(struct obd_ops *dt_ops, struct md_ops *md_ops, ...@@ -201,7 +200,7 @@ int class_register_type(struct obd_ops *dt_ops, struct md_ops *md_ops,
type->typ_procroot = NULL; type->typ_procroot = NULL;
GOTO (failed, rc); GOTO (failed, rc);
} }
#endif
if (ldt != NULL) { if (ldt != NULL) {
type->typ_lu = ldt; type->typ_lu = ldt;
rc = lu_device_type_init(ldt); rc = lu_device_type_init(ldt);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment