git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
fs
/
reiserfs
/
procfs.c
diff --git
a/fs/reiserfs/procfs.c
b/fs/reiserfs/procfs.c
index
731688e
..
ecc9943
100644
(file)
--- a/
fs/reiserfs/procfs.c
+++ b/
fs/reiserfs/procfs.c
@@
-10,7
+10,6
@@
/* $Id: procfs.c,v 1.1.8.2 2001/07/15 17:08:42 god Exp $ */
/* $Id: procfs.c,v 1.1.8.2 2001/07/15 17:08:42 god Exp $ */
-#include <linux/config.h>
#include <linux/module.h>
#include <linux/time.h>
#include <linux/seq_file.h>
#include <linux/module.h>
#include <linux/time.h>
#include <linux/seq_file.h>
@@
-296,7
+295,7
@@
static int show_oidmap(struct seq_file *m, struct super_block *sb)
}
#if defined( REISERFS_USE_OIDMAPF )
if (sb_info->oidmap.use_file && (sb_info->oidmap.mapf != NULL)) {
}
#if defined( REISERFS_USE_OIDMAPF )
if (sb_info->oidmap.use_file && (sb_info->oidmap.mapf != NULL)) {
- loff_t size = sb_info->oidmap.mapf->f_dentry->d_inode->i_size;
+ loff_t size = sb_info->oidmap.mapf->f_
path.
dentry->d_inode->i_size;
total_used += size / sizeof(reiserfs_oidinterval_d_t);
}
#endif
total_used += size / sizeof(reiserfs_oidinterval_d_t);
}
#endif
@@
-493,9
+492,17
@@
static void add_file(struct super_block *sb, char *name,
int reiserfs_proc_info_init(struct super_block *sb)
{
int reiserfs_proc_info_init(struct super_block *sb)
{
+ char b[BDEVNAME_SIZE];
+ char *s;
+
+ /* Some block devices use /'s */
+ strlcpy(b, reiserfs_bdevname(sb), BDEVNAME_SIZE);
+ s = strchr(b, '/');
+ if (s)
+ *s = '!';
+
spin_lock_init(&__PINFO(sb).lock);
spin_lock_init(&__PINFO(sb).lock);
- REISERFS_SB(sb)->procdir =
- proc_mkdir(reiserfs_bdevname(sb), proc_info_root);
+ REISERFS_SB(sb)->procdir = proc_mkdir(b, proc_info_root);
if (REISERFS_SB(sb)->procdir) {
REISERFS_SB(sb)->procdir->owner = THIS_MODULE;
REISERFS_SB(sb)->procdir->data = sb;
if (REISERFS_SB(sb)->procdir) {
REISERFS_SB(sb)->procdir->owner = THIS_MODULE;
REISERFS_SB(sb)->procdir->data = sb;
@@
-509,13
+516,22
@@
int reiserfs_proc_info_init(struct super_block *sb)
return 0;
}
reiserfs_warning(sb, "reiserfs: cannot create /proc/%s/%s",
return 0;
}
reiserfs_warning(sb, "reiserfs: cannot create /proc/%s/%s",
- proc_info_root_name,
reiserfs_bdevname(sb)
);
+ proc_info_root_name,
b
);
return 1;
}
int reiserfs_proc_info_done(struct super_block *sb)
{
struct proc_dir_entry *de = REISERFS_SB(sb)->procdir;
return 1;
}
int reiserfs_proc_info_done(struct super_block *sb)
{
struct proc_dir_entry *de = REISERFS_SB(sb)->procdir;
+ char b[BDEVNAME_SIZE];
+ char *s;
+
+ /* Some block devices use /'s */
+ strlcpy(b, reiserfs_bdevname(sb), BDEVNAME_SIZE);
+ s = strchr(b, '/');
+ if (s)
+ *s = '!';
+
if (de) {
remove_proc_entry("journal", de);
remove_proc_entry("oidmap", de);
if (de) {
remove_proc_entry("journal", de);
remove_proc_entry("oidmap", de);
@@
-529,7
+545,7
@@
int reiserfs_proc_info_done(struct super_block *sb)
__PINFO(sb).exiting = 1;
spin_unlock(&__PINFO(sb).lock);
if (proc_info_root) {
__PINFO(sb).exiting = 1;
spin_unlock(&__PINFO(sb).lock);
if (proc_info_root) {
- remove_proc_entry(
reiserfs_bdevname(sb)
, proc_info_root);
+ remove_proc_entry(
b
, proc_info_root);
REISERFS_SB(sb)->procdir = NULL;
}
return 0;
REISERFS_SB(sb)->procdir = NULL;
}
return 0;