staging/lustre/ldlm: inline ldlm_proc_setup
authorPeng Tao <bergwolf@gmail.com>
Tue, 3 Dec 2013 14:42:01 +0000 (22:42 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Dec 2013 16:54:54 +0000 (08:54 -0800)
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/include/lustre_dlm.h
drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c

index bc2b82ffae92a694f728e110f710afe83b21f83c..ec4bb5e3c13e9076e2161dcc1020ac0390e70aba 100644 (file)
@@ -1285,10 +1285,11 @@ void ldlm_namespace_register(struct ldlm_namespace *ns, ldlm_side_t client);
 void ldlm_namespace_unregister(struct ldlm_namespace *ns, ldlm_side_t client);
 void ldlm_namespace_get(struct ldlm_namespace *ns);
 void ldlm_namespace_put(struct ldlm_namespace *ns);
-int ldlm_proc_setup(void);
 #ifdef LPROCFS
+int ldlm_proc_setup(void);
 void ldlm_proc_cleanup(void);
 #else
+static inline int ldlm_proc_setup(void) { return 0; }
 static inline void ldlm_proc_cleanup(void) {}
 #endif
 
index 85f5e7e42486a5c415e0bef4313ac140ea622628..3ed020eb89c03a27f0c213d7943e8baf8f07bbce 100644 (file)
@@ -1012,11 +1012,9 @@ static int ldlm_setup(void)
        if (ldlm_state == NULL)
                return -ENOMEM;
 
-#ifdef LPROCFS
        rc = ldlm_proc_setup();
        if (rc != 0)
                GOTO(out, rc);
-#endif
 
        memset(&conf, 0, sizeof(conf));
        conf = (typeof(conf)) {