diff options
author | David Howells <dhowells@redhat.com> | 2013-04-10 22:20:50 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-04-29 15:42:00 -0400 |
commit | 3cb5bf1bf947d325fcf6e9458952b51cfd7e6677 (patch) | |
tree | aa7fd55a3f9547ffd5a080adc5b38a18953c4033 /fs/proc/inode.c | |
parent | 526c59784c09fb794a5f0181429525bc473453c9 (diff) |
proc: Delete create_proc_read_entry()
Delete create_proc_read_entry() as it no longer has any users.
Also delete read_proc_t, write_proc_t, the read_proc member of the
proc_dir_entry struct and the support functions that use them. This saves a
pointer for every PDE allocated.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/proc/inode.c')
-rw-r--r-- | fs/proc/inode.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/fs/proc/inode.c b/fs/proc/inode.c index 3b14a45870a9..d50224c70215 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c | |||
@@ -183,41 +183,6 @@ void proc_entry_rundown(struct proc_dir_entry *de) | |||
183 | spin_unlock(&de->pde_unload_lock); | 183 | spin_unlock(&de->pde_unload_lock); |
184 | } | 184 | } |
185 | 185 | ||
186 | /* ->read_proc() users - legacy crap */ | ||
187 | static ssize_t | ||
188 | proc_file_read(struct file *file, char __user *buf, size_t nbytes, | ||
189 | loff_t *ppos) | ||
190 | { | ||
191 | struct proc_dir_entry *pde = PDE(file_inode(file)); | ||
192 | ssize_t rv = -EIO; | ||
193 | if (use_pde(pde)) { | ||
194 | rv = __proc_file_read(file, buf, nbytes, ppos); | ||
195 | unuse_pde(pde); | ||
196 | } | ||
197 | return rv; | ||
198 | } | ||
199 | |||
200 | static loff_t | ||
201 | proc_file_lseek(struct file *file, loff_t offset, int orig) | ||
202 | { | ||
203 | loff_t retval = -EINVAL; | ||
204 | switch (orig) { | ||
205 | case 1: | ||
206 | offset += file->f_pos; | ||
207 | /* fallthrough */ | ||
208 | case 0: | ||
209 | if (offset < 0 || offset > MAX_NON_LFS) | ||
210 | break; | ||
211 | file->f_pos = retval = offset; | ||
212 | } | ||
213 | return retval; | ||
214 | } | ||
215 | |||
216 | const struct file_operations proc_file_operations = { | ||
217 | .llseek = proc_file_lseek, | ||
218 | .read = proc_file_read, | ||
219 | }; | ||
220 | |||
221 | static loff_t proc_reg_llseek(struct file *file, loff_t offset, int whence) | 186 | static loff_t proc_reg_llseek(struct file *file, loff_t offset, int whence) |
222 | { | 187 | { |
223 | struct proc_dir_entry *pde = PDE(file_inode(file)); | 188 | struct proc_dir_entry *pde = PDE(file_inode(file)); |