@@ -194,15 +194,10 @@ void orangefs_debugfs_init(int debug_mask)
194
194
*/
195
195
static void orangefs_kernel_debug_init (void )
196
196
{
197
- int rc = - ENOMEM ;
198
- char * k_buffer = NULL ;
197
+ static char k_buffer [ORANGEFS_MAX_DEBUG_STRING_LEN ] = { };
199
198
200
199
gossip_debug (GOSSIP_DEBUGFS_DEBUG , "%s: start\n" , __func__ );
201
200
202
- k_buffer = kzalloc (ORANGEFS_MAX_DEBUG_STRING_LEN , GFP_KERNEL );
203
- if (!k_buffer )
204
- goto out ;
205
-
206
201
if (strlen (kernel_debug_string ) + 1 < ORANGEFS_MAX_DEBUG_STRING_LEN ) {
207
202
strcpy (k_buffer , kernel_debug_string );
208
203
strcat (k_buffer , "\n" );
@@ -213,9 +208,6 @@ static void orangefs_kernel_debug_init(void)
213
208
214
209
debugfs_create_file (ORANGEFS_KMOD_DEBUG_FILE , 0444 , debug_dir , k_buffer ,
215
210
& kernel_debug_fops );
216
-
217
- out :
218
- gossip_debug (GOSSIP_DEBUGFS_DEBUG , "%s: rc:%d:\n" , __func__ , rc );
219
211
}
220
212
221
213
@@ -299,18 +291,13 @@ static int help_show(struct seq_file *m, void *v)
299
291
/*
300
292
* initialize the client-debug file.
301
293
*/
302
- static int orangefs_client_debug_init (void )
294
+ static void orangefs_client_debug_init (void )
303
295
{
304
296
305
- int rc = - ENOMEM ;
306
- char * c_buffer = NULL ;
297
+ static char c_buffer [ORANGEFS_MAX_DEBUG_STRING_LEN ] = { };
307
298
308
299
gossip_debug (GOSSIP_DEBUGFS_DEBUG , "%s: start\n" , __func__ );
309
300
310
- c_buffer = kzalloc (ORANGEFS_MAX_DEBUG_STRING_LEN , GFP_KERNEL );
311
- if (!c_buffer )
312
- goto out ;
313
-
314
301
if (strlen (client_debug_string ) + 1 < ORANGEFS_MAX_DEBUG_STRING_LEN ) {
315
302
strcpy (c_buffer , client_debug_string );
316
303
strcat (c_buffer , "\n" );
@@ -324,13 +311,6 @@ static int orangefs_client_debug_init(void)
324
311
debug_dir ,
325
312
c_buffer ,
326
313
& kernel_debug_fops );
327
-
328
- rc = 0 ;
329
-
330
- out :
331
-
332
- gossip_debug (GOSSIP_DEBUGFS_DEBUG , "%s: rc:%d:\n" , __func__ , rc );
333
- return rc ;
334
314
}
335
315
336
316
/* open ORANGEFS_KMOD_DEBUG_FILE or ORANGEFS_CLIENT_DEBUG_FILE.*/
0 commit comments