diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-03-30 20:16:20 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-04-09 14:13:12 -0400 |
commit | 121daf5f8b4a60158e26f357eb286acf83eb33b4 (patch) | |
tree | f280a7b6e1384157d3db1a25ae0014c4058fb7b3 /fs/reiserfs/procfs.c | |
parent | bdcecec3242368688c44eebb6c7f5fd460990c40 (diff) |
reiserfs: use proc_remove_subtree()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/reiserfs/procfs.c')
-rw-r--r-- | fs/reiserfs/procfs.c | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/fs/reiserfs/procfs.c b/fs/reiserfs/procfs.c index 9cc0740adffa..274adea363ff 100644 --- a/fs/reiserfs/procfs.c +++ b/fs/reiserfs/procfs.c | |||
@@ -499,29 +499,17 @@ int reiserfs_proc_info_init(struct super_block *sb) | |||
499 | int reiserfs_proc_info_done(struct super_block *sb) | 499 | int reiserfs_proc_info_done(struct super_block *sb) |
500 | { | 500 | { |
501 | struct proc_dir_entry *de = REISERFS_SB(sb)->procdir; | 501 | struct proc_dir_entry *de = REISERFS_SB(sb)->procdir; |
502 | char b[BDEVNAME_SIZE]; | 502 | if (de) { |
503 | char *s; | 503 | char b[BDEVNAME_SIZE]; |
504 | char *s; | ||
504 | 505 | ||
505 | /* Some block devices use /'s */ | 506 | /* Some block devices use /'s */ |
506 | strlcpy(b, reiserfs_bdevname(sb), BDEVNAME_SIZE); | 507 | strlcpy(b, reiserfs_bdevname(sb), BDEVNAME_SIZE); |
507 | s = strchr(b, '/'); | 508 | s = strchr(b, '/'); |
508 | if (s) | 509 | if (s) |
509 | *s = '!'; | 510 | *s = '!'; |
510 | 511 | ||
511 | if (de) { | 512 | remove_proc_subtree(b, proc_info_root); |
512 | remove_proc_entry("journal", de); | ||
513 | remove_proc_entry("oidmap", de); | ||
514 | remove_proc_entry("on-disk-super", de); | ||
515 | remove_proc_entry("bitmap", de); | ||
516 | remove_proc_entry("per-level", de); | ||
517 | remove_proc_entry("super", de); | ||
518 | remove_proc_entry("version", de); | ||
519 | } | ||
520 | spin_lock(&__PINFO(sb).lock); | ||
521 | __PINFO(sb).exiting = 1; | ||
522 | spin_unlock(&__PINFO(sb).lock); | ||
523 | if (proc_info_root) { | ||
524 | remove_proc_entry(b, proc_info_root); | ||
525 | REISERFS_SB(sb)->procdir = NULL; | 513 | REISERFS_SB(sb)->procdir = NULL; |
526 | } | 514 | } |
527 | return 0; | 515 | return 0; |