]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
staging/lustre/obdclass: lprocfs_{alloc_stats,register} always defined
authorPeng Tao <bergwolf@gmail.com>
Tue, 3 Dec 2013 14:41:59 +0000 (22:41 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Dec 2013 16:54:23 +0000 (08:54 -0800)
No need to surround them with #ifdef LPROCFS.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/obdclass/class_obd.c
drivers/staging/lustre/lustre/obdclass/genops.c

index 4afd962cdb64db50c83f5312b656ed0fe6131b4f..4fb1ecd089088fa50cd630e6e3ed39305be822c3 100644 (file)
@@ -516,7 +516,7 @@ static int __init init_obdclass(void)
 
        spin_lock_init(&obd_types_lock);
        obd_zombie_impexp_init();
-#ifdef LPROCFS
+
        obd_memory = lprocfs_alloc_stats(OBD_STATS_NUM,
                                         LPROCFS_STATS_FLAG_NONE |
                                         LPROCFS_STATS_FLAG_IRQ_SAFE);
@@ -531,7 +531,7 @@ static int __init init_obdclass(void)
        lprocfs_counter_init(obd_memory, OBD_MEMORY_PAGES_STAT,
                             LPROCFS_CNTR_AVGMINMAX,
                             "pagesused", "pages");
-#endif
+
        err = obd_init_checks();
        if (err == -EOVERFLOW)
                return err;
index f6fae16fc7f7f75d0cdd507707d29d0eb7e3f8b0..d9f750d42c8058b67a08806bf532c8ed5ab8d7e2 100644 (file)
@@ -193,7 +193,6 @@ int class_register_type(struct obd_ops *dt_ops, struct md_ops *md_ops,
        strcpy(type->typ_name, name);
        spin_lock_init(&type->obd_type_lock);
 
-#ifdef LPROCFS
        type->typ_procroot = lprocfs_register(type->typ_name, proc_lustre_root,
                                              vars, type);
        if (IS_ERR(type->typ_procroot)) {
@@ -201,7 +200,7 @@ int class_register_type(struct obd_ops *dt_ops, struct md_ops *md_ops,
                type->typ_procroot = NULL;
                GOTO (failed, rc);
        }
-#endif
+
        if (ldt != NULL) {
                type->typ_lu = ldt;
                rc = lu_device_type_init(ldt);