diff options
author | Anton Altaparmakov <aia21@cantab.net> | 2005-10-31 05:06:46 -0500 |
---|---|---|
committer | Anton Altaparmakov <aia21@cantab.net> | 2005-10-31 05:06:46 -0500 |
commit | 1f04c0a24b2f3cfe89c802a24396263623e3512d (patch) | |
tree | d7e2216b6e65b833c0c2b79b478d13ce17dbf296 /fs/proc | |
parent | 07b188ab773e183871e57b33ae37bf635c9f12ba (diff) | |
parent | e2f2e58e7968f8446b1078a20a18bf8ea12b4fbc (diff) |
Merge branch 'master' of /usr/src/ntfs-2.6/
Diffstat (limited to 'fs/proc')
-rw-r--r-- | fs/proc/generic.c | 2 | ||||
-rw-r--r-- | fs/proc/inode.c | 17 | ||||
-rw-r--r-- | fs/proc/proc_misc.c | 8 |
3 files changed, 11 insertions, 16 deletions
diff --git a/fs/proc/generic.c b/fs/proc/generic.c index 8a8c34461d48..b638fb500743 100644 --- a/fs/proc/generic.c +++ b/fs/proc/generic.c | |||
@@ -533,7 +533,7 @@ static void proc_kill_inodes(struct proc_dir_entry *de) | |||
533 | */ | 533 | */ |
534 | file_list_lock(); | 534 | file_list_lock(); |
535 | list_for_each(p, &sb->s_files) { | 535 | list_for_each(p, &sb->s_files) { |
536 | struct file * filp = list_entry(p, struct file, f_list); | 536 | struct file * filp = list_entry(p, struct file, f_u.fu_list); |
537 | struct dentry * dentry = filp->f_dentry; | 537 | struct dentry * dentry = filp->f_dentry; |
538 | struct inode * inode; | 538 | struct inode * inode; |
539 | struct file_operations *fops; | 539 | struct file_operations *fops; |
diff --git a/fs/proc/inode.c b/fs/proc/inode.c index effa6c0c467a..e6a818a93f3d 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c | |||
@@ -156,10 +156,13 @@ struct inode *proc_get_inode(struct super_block *sb, unsigned int ino, | |||
156 | 156 | ||
157 | WARN_ON(de && de->deleted); | 157 | WARN_ON(de && de->deleted); |
158 | 158 | ||
159 | if (de != NULL && !try_module_get(de->owner)) | ||
160 | goto out_mod; | ||
161 | |||
159 | inode = iget(sb, ino); | 162 | inode = iget(sb, ino); |
160 | if (!inode) | 163 | if (!inode) |
161 | goto out_fail; | 164 | goto out_ino; |
162 | 165 | ||
163 | PROC_I(inode)->pde = de; | 166 | PROC_I(inode)->pde = de; |
164 | if (de) { | 167 | if (de) { |
165 | if (de->mode) { | 168 | if (de->mode) { |
@@ -171,20 +174,20 @@ struct inode *proc_get_inode(struct super_block *sb, unsigned int ino, | |||
171 | inode->i_size = de->size; | 174 | inode->i_size = de->size; |
172 | if (de->nlink) | 175 | if (de->nlink) |
173 | inode->i_nlink = de->nlink; | 176 | inode->i_nlink = de->nlink; |
174 | if (!try_module_get(de->owner)) | ||
175 | goto out_fail; | ||
176 | if (de->proc_iops) | 177 | if (de->proc_iops) |
177 | inode->i_op = de->proc_iops; | 178 | inode->i_op = de->proc_iops; |
178 | if (de->proc_fops) | 179 | if (de->proc_fops) |
179 | inode->i_fop = de->proc_fops; | 180 | inode->i_fop = de->proc_fops; |
180 | } | 181 | } |
181 | 182 | ||
182 | out: | ||
183 | return inode; | 183 | return inode; |
184 | 184 | ||
185 | out_fail: | 185 | out_ino: |
186 | if (de != NULL) | ||
187 | module_put(de->owner); | ||
188 | out_mod: | ||
186 | de_put(de); | 189 | de_put(de); |
187 | goto out; | 190 | return NULL; |
188 | } | 191 | } |
189 | 192 | ||
190 | int proc_fill_super(struct super_block *s, void *data, int silent) | 193 | int proc_fill_super(struct super_block *s, void *data, int silent) |
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c index a3453555a94e..5b6b0b6038a7 100644 --- a/fs/proc/proc_misc.c +++ b/fs/proc/proc_misc.c | |||
@@ -629,12 +629,4 @@ void __init proc_misc_init(void) | |||
629 | if (entry) | 629 | if (entry) |
630 | entry->proc_fops = &proc_sysrq_trigger_operations; | 630 | entry->proc_fops = &proc_sysrq_trigger_operations; |
631 | #endif | 631 | #endif |
632 | #ifdef CONFIG_PPC32 | ||
633 | { | ||
634 | extern struct file_operations ppc_htab_operations; | ||
635 | entry = create_proc_entry("ppc_htab", S_IRUGO|S_IWUSR, NULL); | ||
636 | if (entry) | ||
637 | entry->proc_fops = &ppc_htab_operations; | ||
638 | } | ||
639 | #endif | ||
640 | } | 632 | } |