diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/afs/proc.c | 1 | ||||
-rw-r--r-- | fs/cifs/cifs_debug.c | 1 | ||||
-rw-r--r-- | fs/jfs/jfs_debug.c | 1 | ||||
-rw-r--r-- | fs/nfs/client.c | 2 | ||||
-rw-r--r-- | fs/proc/inode.c | 19 | ||||
-rw-r--r-- | fs/proc/proc_tty.c | 1 | ||||
-rw-r--r-- | fs/reiserfs/procfs.c | 5 |
7 files changed, 4 insertions, 26 deletions
diff --git a/fs/afs/proc.c b/fs/afs/proc.c index 7578c1ab9e0b..8630615e57fe 100644 --- a/fs/afs/proc.c +++ b/fs/afs/proc.c | |||
@@ -146,7 +146,6 @@ int afs_proc_init(void) | |||
146 | proc_afs = proc_mkdir("fs/afs", NULL); | 146 | proc_afs = proc_mkdir("fs/afs", NULL); |
147 | if (!proc_afs) | 147 | if (!proc_afs) |
148 | goto error_dir; | 148 | goto error_dir; |
149 | proc_afs->owner = THIS_MODULE; | ||
150 | 149 | ||
151 | p = proc_create("cells", 0, proc_afs, &afs_proc_cells_fops); | 150 | p = proc_create("cells", 0, proc_afs, &afs_proc_cells_fops); |
152 | if (!p) | 151 | if (!p) |
diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c index 877e4d9a1159..7f19fefd3d45 100644 --- a/fs/cifs/cifs_debug.c +++ b/fs/cifs/cifs_debug.c | |||
@@ -404,7 +404,6 @@ cifs_proc_init(void) | |||
404 | if (proc_fs_cifs == NULL) | 404 | if (proc_fs_cifs == NULL) |
405 | return; | 405 | return; |
406 | 406 | ||
407 | proc_fs_cifs->owner = THIS_MODULE; | ||
408 | proc_create("DebugData", 0, proc_fs_cifs, &cifs_debug_data_proc_fops); | 407 | proc_create("DebugData", 0, proc_fs_cifs, &cifs_debug_data_proc_fops); |
409 | 408 | ||
410 | #ifdef CONFIG_CIFS_STATS | 409 | #ifdef CONFIG_CIFS_STATS |
diff --git a/fs/jfs/jfs_debug.c b/fs/jfs/jfs_debug.c index 6a73de84bcef..dd824d9b0b1a 100644 --- a/fs/jfs/jfs_debug.c +++ b/fs/jfs/jfs_debug.c | |||
@@ -90,7 +90,6 @@ void jfs_proc_init(void) | |||
90 | 90 | ||
91 | if (!(base = proc_mkdir("fs/jfs", NULL))) | 91 | if (!(base = proc_mkdir("fs/jfs", NULL))) |
92 | return; | 92 | return; |
93 | base->owner = THIS_MODULE; | ||
94 | 93 | ||
95 | for (i = 0; i < NPROCENT; i++) | 94 | for (i = 0; i < NPROCENT; i++) |
96 | proc_create(Entries[i].name, 0, base, Entries[i].proc_fops); | 95 | proc_create(Entries[i].name, 0, base, Entries[i].proc_fops); |
diff --git a/fs/nfs/client.c b/fs/nfs/client.c index 574158ae2398..2277421656e7 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c | |||
@@ -1606,8 +1606,6 @@ int __init nfs_fs_proc_init(void) | |||
1606 | if (!proc_fs_nfs) | 1606 | if (!proc_fs_nfs) |
1607 | goto error_0; | 1607 | goto error_0; |
1608 | 1608 | ||
1609 | proc_fs_nfs->owner = THIS_MODULE; | ||
1610 | |||
1611 | /* a file of servers with which we're dealing */ | 1609 | /* a file of servers with which we're dealing */ |
1612 | p = proc_create("servers", S_IFREG|S_IRUGO, | 1610 | p = proc_create("servers", S_IFREG|S_IRUGO, |
1613 | proc_fs_nfs, &nfs_server_list_fops); | 1611 | proc_fs_nfs, &nfs_server_list_fops); |
diff --git a/fs/proc/inode.c b/fs/proc/inode.c index e11dc22c6511..d78ade305541 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c | |||
@@ -58,11 +58,8 @@ static void proc_delete_inode(struct inode *inode) | |||
58 | 58 | ||
59 | /* Let go of any associated proc directory entry */ | 59 | /* Let go of any associated proc directory entry */ |
60 | de = PROC_I(inode)->pde; | 60 | de = PROC_I(inode)->pde; |
61 | if (de) { | 61 | if (de) |
62 | if (de->owner) | ||
63 | module_put(de->owner); | ||
64 | de_put(de); | 62 | de_put(de); |
65 | } | ||
66 | if (PROC_I(inode)->sysctl) | 63 | if (PROC_I(inode)->sysctl) |
67 | sysctl_head_put(PROC_I(inode)->sysctl); | 64 | sysctl_head_put(PROC_I(inode)->sysctl); |
68 | clear_inode(inode); | 65 | clear_inode(inode); |
@@ -449,12 +446,9 @@ struct inode *proc_get_inode(struct super_block *sb, unsigned int ino, | |||
449 | { | 446 | { |
450 | struct inode * inode; | 447 | struct inode * inode; |
451 | 448 | ||
452 | if (!try_module_get(de->owner)) | ||
453 | goto out_mod; | ||
454 | |||
455 | inode = iget_locked(sb, ino); | 449 | inode = iget_locked(sb, ino); |
456 | if (!inode) | 450 | if (!inode) |
457 | goto out_ino; | 451 | return NULL; |
458 | if (inode->i_state & I_NEW) { | 452 | if (inode->i_state & I_NEW) { |
459 | inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; | 453 | inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; |
460 | PROC_I(inode)->fd = 0; | 454 | PROC_I(inode)->fd = 0; |
@@ -485,16 +479,9 @@ struct inode *proc_get_inode(struct super_block *sb, unsigned int ino, | |||
485 | } | 479 | } |
486 | } | 480 | } |
487 | unlock_new_inode(inode); | 481 | unlock_new_inode(inode); |
488 | } else { | 482 | } else |
489 | module_put(de->owner); | ||
490 | de_put(de); | 483 | de_put(de); |
491 | } | ||
492 | return inode; | 484 | return inode; |
493 | |||
494 | out_ino: | ||
495 | module_put(de->owner); | ||
496 | out_mod: | ||
497 | return NULL; | ||
498 | } | 485 | } |
499 | 486 | ||
500 | int proc_fill_super(struct super_block *s) | 487 | int proc_fill_super(struct super_block *s) |
diff --git a/fs/proc/proc_tty.c b/fs/proc/proc_tty.c index d153946d6d15..4a9e0f65ae60 100644 --- a/fs/proc/proc_tty.c +++ b/fs/proc/proc_tty.c | |||
@@ -152,7 +152,6 @@ void proc_tty_register_driver(struct tty_driver *driver) | |||
152 | if (!ent) | 152 | if (!ent) |
153 | return; | 153 | return; |
154 | ent->read_proc = driver->ops->read_proc; | 154 | ent->read_proc = driver->ops->read_proc; |
155 | ent->owner = driver->owner; | ||
156 | ent->data = driver; | 155 | ent->data = driver; |
157 | 156 | ||
158 | driver->proc_entry = ent; | 157 | driver->proc_entry = ent; |
diff --git a/fs/reiserfs/procfs.c b/fs/reiserfs/procfs.c index d5066400638a..9229e5514a4e 100644 --- a/fs/reiserfs/procfs.c +++ b/fs/reiserfs/procfs.c | |||
@@ -492,7 +492,6 @@ int reiserfs_proc_info_init(struct super_block *sb) | |||
492 | spin_lock_init(&__PINFO(sb).lock); | 492 | spin_lock_init(&__PINFO(sb).lock); |
493 | REISERFS_SB(sb)->procdir = proc_mkdir(b, proc_info_root); | 493 | REISERFS_SB(sb)->procdir = proc_mkdir(b, proc_info_root); |
494 | if (REISERFS_SB(sb)->procdir) { | 494 | if (REISERFS_SB(sb)->procdir) { |
495 | REISERFS_SB(sb)->procdir->owner = THIS_MODULE; | ||
496 | REISERFS_SB(sb)->procdir->data = sb; | 495 | REISERFS_SB(sb)->procdir->data = sb; |
497 | add_file(sb, "version", show_version); | 496 | add_file(sb, "version", show_version); |
498 | add_file(sb, "super", show_super); | 497 | add_file(sb, "super", show_super); |
@@ -556,9 +555,7 @@ int reiserfs_proc_info_global_init(void) | |||
556 | { | 555 | { |
557 | if (proc_info_root == NULL) { | 556 | if (proc_info_root == NULL) { |
558 | proc_info_root = proc_mkdir(proc_info_root_name, NULL); | 557 | proc_info_root = proc_mkdir(proc_info_root_name, NULL); |
559 | if (proc_info_root) { | 558 | if (!proc_info_root) { |
560 | proc_info_root->owner = THIS_MODULE; | ||
561 | } else { | ||
562 | reiserfs_warning(NULL, "cannot create /proc/%s", | 559 | reiserfs_warning(NULL, "cannot create /proc/%s", |
563 | proc_info_root_name); | 560 | proc_info_root_name); |
564 | return 1; | 561 | return 1; |