diff options
-rw-r--r-- | drivers/staging/lustre/lustre/fid/fid_request.c | 20 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/fld/fld_request.c | 20 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 9 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 34 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/llite/lproc_llite.c | 7 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/lov/lov_obd.c | 5 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/obdclass/genops.c | 11 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 11 |
8 files changed, 24 insertions, 93 deletions
diff --git a/drivers/staging/lustre/lustre/fid/fid_request.c b/drivers/staging/lustre/lustre/fid/fid_request.c index c674652af03a..dfcac0afa106 100644 --- a/drivers/staging/lustre/lustre/fid/fid_request.c +++ b/drivers/staging/lustre/lustre/fid/fid_request.c | |||
@@ -299,17 +299,8 @@ static int seq_client_debugfs_init(struct lu_client_seq *seq) | |||
299 | { | 299 | { |
300 | int rc; | 300 | int rc; |
301 | 301 | ||
302 | seq->lcs_debugfs_entry = ldebugfs_register(seq->lcs_name, | 302 | seq->lcs_debugfs_entry = debugfs_create_dir(seq->lcs_name, |
303 | seq_debugfs_dir, | 303 | seq_debugfs_dir); |
304 | NULL, NULL); | ||
305 | |||
306 | if (IS_ERR_OR_NULL(seq->lcs_debugfs_entry)) { | ||
307 | CERROR("%s: LdebugFS failed in seq-init\n", seq->lcs_name); | ||
308 | rc = seq->lcs_debugfs_entry ? PTR_ERR(seq->lcs_debugfs_entry) | ||
309 | : -ENOMEM; | ||
310 | seq->lcs_debugfs_entry = NULL; | ||
311 | return rc; | ||
312 | } | ||
313 | 304 | ||
314 | rc = ldebugfs_add_vars(seq->lcs_debugfs_entry, | 305 | rc = ldebugfs_add_vars(seq->lcs_debugfs_entry, |
315 | seq_client_debugfs_list, seq); | 306 | seq_client_debugfs_list, seq); |
@@ -424,10 +415,9 @@ static int __init fid_init(void) | |||
424 | if (rc) | 415 | if (rc) |
425 | return rc; | 416 | return rc; |
426 | 417 | ||
427 | seq_debugfs_dir = ldebugfs_register(LUSTRE_SEQ_NAME, | 418 | seq_debugfs_dir = debugfs_create_dir(LUSTRE_SEQ_NAME, |
428 | debugfs_lustre_root, | 419 | debugfs_lustre_root); |
429 | NULL, NULL); | 420 | return 0; |
430 | return PTR_ERR_OR_ZERO(seq_debugfs_dir); | ||
431 | } | 421 | } |
432 | 422 | ||
433 | static void __exit fid_exit(void) | 423 | static void __exit fid_exit(void) |
diff --git a/drivers/staging/lustre/lustre/fld/fld_request.c b/drivers/staging/lustre/lustre/fld/fld_request.c index 7b7ba93a4db6..409850379fc3 100644 --- a/drivers/staging/lustre/lustre/fld/fld_request.c +++ b/drivers/staging/lustre/lustre/fld/fld_request.c | |||
@@ -221,17 +221,8 @@ static int fld_client_debugfs_init(struct lu_client_fld *fld) | |||
221 | { | 221 | { |
222 | int rc; | 222 | int rc; |
223 | 223 | ||
224 | fld->lcf_debugfs_entry = ldebugfs_register(fld->lcf_name, | 224 | fld->lcf_debugfs_entry = debugfs_create_dir(fld->lcf_name, |
225 | fld_debugfs_dir, | 225 | fld_debugfs_dir); |
226 | NULL, NULL); | ||
227 | |||
228 | if (IS_ERR_OR_NULL(fld->lcf_debugfs_entry)) { | ||
229 | CERROR("%s: LdebugFS failed in fld-init\n", fld->lcf_name); | ||
230 | rc = fld->lcf_debugfs_entry ? PTR_ERR(fld->lcf_debugfs_entry) | ||
231 | : -ENOMEM; | ||
232 | fld->lcf_debugfs_entry = NULL; | ||
233 | return rc; | ||
234 | } | ||
235 | 226 | ||
236 | rc = ldebugfs_add_vars(fld->lcf_debugfs_entry, | 227 | rc = ldebugfs_add_vars(fld->lcf_debugfs_entry, |
237 | fld_client_debugfs_list, fld); | 228 | fld_client_debugfs_list, fld); |
@@ -455,10 +446,9 @@ static int __init fld_init(void) | |||
455 | if (rc) | 446 | if (rc) |
456 | return rc; | 447 | return rc; |
457 | 448 | ||
458 | fld_debugfs_dir = ldebugfs_register(LUSTRE_FLD_NAME, | 449 | fld_debugfs_dir = debugfs_create_dir(LUSTRE_FLD_NAME, |
459 | debugfs_lustre_root, | 450 | debugfs_lustre_root); |
460 | NULL, NULL); | 451 | return 0; |
461 | return PTR_ERR_OR_ZERO(fld_debugfs_dir); | ||
462 | } | 452 | } |
463 | 453 | ||
464 | static void __exit fld_exit(void) | 454 | static void __exit fld_exit(void) |
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c b/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c index b83e93256cd1..146b348ca312 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | |||
@@ -572,14 +572,7 @@ static int ldlm_pool_debugfs_init(struct ldlm_pool *pl) | |||
572 | rc = -EINVAL; | 572 | rc = -EINVAL; |
573 | goto out_free_name; | 573 | goto out_free_name; |
574 | } | 574 | } |
575 | pl->pl_debugfs_entry = ldebugfs_register("pool", debugfs_ns_parent, | 575 | pl->pl_debugfs_entry = debugfs_create_dir("pool", debugfs_ns_parent); |
576 | NULL, NULL); | ||
577 | if (IS_ERR(pl->pl_debugfs_entry)) { | ||
578 | CERROR("LdebugFS failed in ldlm-pool-init\n"); | ||
579 | rc = PTR_ERR(pl->pl_debugfs_entry); | ||
580 | pl->pl_debugfs_entry = NULL; | ||
581 | goto out_free_name; | ||
582 | } | ||
583 | 576 | ||
584 | var_name[MAX_STRING_SIZE] = '\0'; | 577 | var_name[MAX_STRING_SIZE] = '\0'; |
585 | memset(pool_vars, 0, sizeof(pool_vars)); | 578 | memset(pool_vars, 0, sizeof(pool_vars)); |
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c index 28cd8398d4ce..691899ef8044 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | |||
@@ -110,34 +110,13 @@ int ldlm_debugfs_setup(void) | |||
110 | { | 110 | { |
111 | int rc; | 111 | int rc; |
112 | 112 | ||
113 | ldlm_debugfs_dir = ldebugfs_register(OBD_LDLM_DEVICENAME, | 113 | ldlm_debugfs_dir = debugfs_create_dir(OBD_LDLM_DEVICENAME, |
114 | debugfs_lustre_root, | 114 | debugfs_lustre_root); |
115 | NULL, NULL); | ||
116 | if (IS_ERR_OR_NULL(ldlm_debugfs_dir)) { | ||
117 | CERROR("LProcFS failed in ldlm-init\n"); | ||
118 | rc = ldlm_debugfs_dir ? PTR_ERR(ldlm_debugfs_dir) : -ENOMEM; | ||
119 | goto err; | ||
120 | } | ||
121 | 115 | ||
122 | ldlm_ns_debugfs_dir = ldebugfs_register("namespaces", | 116 | ldlm_ns_debugfs_dir = debugfs_create_dir("namespaces", |
123 | ldlm_debugfs_dir, | 117 | ldlm_debugfs_dir); |
124 | NULL, NULL); | ||
125 | if (IS_ERR_OR_NULL(ldlm_ns_debugfs_dir)) { | ||
126 | CERROR("LProcFS failed in ldlm-init\n"); | ||
127 | rc = ldlm_ns_debugfs_dir ? PTR_ERR(ldlm_ns_debugfs_dir) | ||
128 | : -ENOMEM; | ||
129 | goto err_type; | ||
130 | } | ||
131 | 118 | ||
132 | ldlm_svc_debugfs_dir = ldebugfs_register("services", | 119 | ldlm_svc_debugfs_dir = debugfs_create_dir("services", ldlm_debugfs_dir); |
133 | ldlm_debugfs_dir, | ||
134 | NULL, NULL); | ||
135 | if (IS_ERR_OR_NULL(ldlm_svc_debugfs_dir)) { | ||
136 | CERROR("LProcFS failed in ldlm-init\n"); | ||
137 | rc = ldlm_svc_debugfs_dir ? PTR_ERR(ldlm_svc_debugfs_dir) | ||
138 | : -ENOMEM; | ||
139 | goto err_ns; | ||
140 | } | ||
141 | 120 | ||
142 | rc = ldebugfs_add_vars(ldlm_debugfs_dir, ldlm_debugfs_list, NULL); | 121 | rc = ldebugfs_add_vars(ldlm_debugfs_dir, ldlm_debugfs_list, NULL); |
143 | if (rc) { | 122 | if (rc) { |
@@ -149,11 +128,8 @@ int ldlm_debugfs_setup(void) | |||
149 | 128 | ||
150 | err_svc: | 129 | err_svc: |
151 | ldebugfs_remove(&ldlm_svc_debugfs_dir); | 130 | ldebugfs_remove(&ldlm_svc_debugfs_dir); |
152 | err_ns: | ||
153 | ldebugfs_remove(&ldlm_ns_debugfs_dir); | 131 | ldebugfs_remove(&ldlm_ns_debugfs_dir); |
154 | err_type: | ||
155 | ldebugfs_remove(&ldlm_debugfs_dir); | 132 | ldebugfs_remove(&ldlm_debugfs_dir); |
156 | err: | ||
157 | ldlm_svc_debugfs_dir = NULL; | 133 | ldlm_svc_debugfs_dir = NULL; |
158 | ldlm_ns_debugfs_dir = NULL; | 134 | ldlm_ns_debugfs_dir = NULL; |
159 | ldlm_debugfs_dir = NULL; | 135 | ldlm_debugfs_dir = NULL; |
diff --git a/drivers/staging/lustre/lustre/llite/lproc_llite.c b/drivers/staging/lustre/lustre/llite/lproc_llite.c index 1f122f8a54dc..1ac36c9ed455 100644 --- a/drivers/staging/lustre/lustre/llite/lproc_llite.c +++ b/drivers/staging/lustre/lustre/llite/lproc_llite.c | |||
@@ -1157,12 +1157,7 @@ int ldebugfs_register_mountpoint(struct dentry *parent, | |||
1157 | snprintf(name, MAX_STRING_SIZE, "%.*s-%p", len, | 1157 | snprintf(name, MAX_STRING_SIZE, "%.*s-%p", len, |
1158 | lsi->lsi_lmd->lmd_profile, sb); | 1158 | lsi->lsi_lmd->lmd_profile, sb); |
1159 | 1159 | ||
1160 | dir = ldebugfs_register(name, parent, NULL, NULL); | 1160 | dir = debugfs_create_dir(name, parent); |
1161 | if (IS_ERR_OR_NULL(dir)) { | ||
1162 | err = dir ? PTR_ERR(dir) : -ENOMEM; | ||
1163 | sbi->ll_debugfs_entry = NULL; | ||
1164 | return err; | ||
1165 | } | ||
1166 | sbi->ll_debugfs_entry = dir; | 1161 | sbi->ll_debugfs_entry = dir; |
1167 | 1162 | ||
1168 | debugfs_create_file("dump_page_cache", 0444, dir, sbi, | 1163 | debugfs_create_file("dump_page_cache", 0444, dir, sbi, |
diff --git a/drivers/staging/lustre/lustre/lov/lov_obd.c b/drivers/staging/lustre/lustre/lov/lov_obd.c index a2a5f59dfc7a..344ff4b20168 100644 --- a/drivers/staging/lustre/lustre/lov/lov_obd.c +++ b/drivers/staging/lustre/lustre/lov/lov_obd.c | |||
@@ -809,9 +809,8 @@ int lov_setup(struct obd_device *obd, struct lustre_cfg *lcfg) | |||
809 | debugfs_create_file("target_obd", 0444, obd->obd_debugfs_entry, obd, | 809 | debugfs_create_file("target_obd", 0444, obd->obd_debugfs_entry, obd, |
810 | &lov_proc_target_fops); | 810 | &lov_proc_target_fops); |
811 | 811 | ||
812 | lov->lov_pool_debugfs_entry = ldebugfs_register("pools", | 812 | lov->lov_pool_debugfs_entry = debugfs_create_dir("pools", |
813 | obd->obd_debugfs_entry, | 813 | obd->obd_debugfs_entry); |
814 | NULL, NULL); | ||
815 | return 0; | 814 | return 0; |
816 | 815 | ||
817 | out: | 816 | out: |
diff --git a/drivers/staging/lustre/lustre/obdclass/genops.c b/drivers/staging/lustre/lustre/obdclass/genops.c index af233b868742..3771452b836c 100644 --- a/drivers/staging/lustre/lustre/obdclass/genops.c +++ b/drivers/staging/lustre/lustre/obdclass/genops.c | |||
@@ -170,15 +170,8 @@ int class_register_type(struct obd_ops *dt_ops, struct md_ops *md_ops, | |||
170 | strcpy(type->typ_name, name); | 170 | strcpy(type->typ_name, name); |
171 | spin_lock_init(&type->obd_type_lock); | 171 | spin_lock_init(&type->obd_type_lock); |
172 | 172 | ||
173 | type->typ_debugfs_entry = ldebugfs_register(type->typ_name, | 173 | type->typ_debugfs_entry = debugfs_create_dir(type->typ_name, |
174 | debugfs_lustre_root, | 174 | debugfs_lustre_root); |
175 | NULL, type); | ||
176 | if (IS_ERR_OR_NULL(type->typ_debugfs_entry)) { | ||
177 | rc = type->typ_debugfs_entry ? PTR_ERR(type->typ_debugfs_entry) | ||
178 | : -ENOMEM; | ||
179 | type->typ_debugfs_entry = NULL; | ||
180 | goto failed; | ||
181 | } | ||
182 | 175 | ||
183 | type->typ_kobj = kobject_create_and_add(type->typ_name, lustre_kobj); | 176 | type->typ_kobj = kobject_create_and_add(type->typ_name, lustre_kobj); |
184 | if (!type->typ_kobj) { | 177 | if (!type->typ_kobj) { |
diff --git a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c index eb21a8dd3708..62404b08f390 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c +++ b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | |||
@@ -197,15 +197,10 @@ ptlrpc_ldebugfs_register(struct dentry *root, char *dir, | |||
197 | if (!svc_stats) | 197 | if (!svc_stats) |
198 | return; | 198 | return; |
199 | 199 | ||
200 | if (dir) { | 200 | if (dir) |
201 | svc_debugfs_entry = ldebugfs_register(dir, root, NULL, NULL); | 201 | svc_debugfs_entry = debugfs_create_dir(dir, root); |
202 | if (IS_ERR(svc_debugfs_entry)) { | 202 | else |
203 | lprocfs_free_stats(&svc_stats); | ||
204 | return; | ||
205 | } | ||
206 | } else { | ||
207 | svc_debugfs_entry = root; | 203 | svc_debugfs_entry = root; |
208 | } | ||
209 | 204 | ||
210 | lprocfs_counter_init(svc_stats, PTLRPC_REQWAIT_CNTR, | 205 | lprocfs_counter_init(svc_stats, PTLRPC_REQWAIT_CNTR, |
211 | svc_counter_config, "req_waittime", "usec"); | 206 | svc_counter_config, "req_waittime", "usec"); |