From 3cb5bf1bf947d325fcf6e9458952b51cfd7e6677 Mon Sep 17 00:00:00 2001 From: David Howells Date: Thu, 11 Apr 2013 03:20:50 +0100 Subject: 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 Signed-off-by: Al Viro --- fs/proc/inode.c | 35 ----------------------------------- 1 file changed, 35 deletions(-) (limited to 'fs/proc/inode.c') 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) spin_unlock(&de->pde_unload_lock); } -/* ->read_proc() users - legacy crap */ -static ssize_t -proc_file_read(struct file *file, char __user *buf, size_t nbytes, - loff_t *ppos) -{ - struct proc_dir_entry *pde = PDE(file_inode(file)); - ssize_t rv = -EIO; - if (use_pde(pde)) { - rv = __proc_file_read(file, buf, nbytes, ppos); - unuse_pde(pde); - } - return rv; -} - -static loff_t -proc_file_lseek(struct file *file, loff_t offset, int orig) -{ - loff_t retval = -EINVAL; - switch (orig) { - case 1: - offset += file->f_pos; - /* fallthrough */ - case 0: - if (offset < 0 || offset > MAX_NON_LFS) - break; - file->f_pos = retval = offset; - } - return retval; -} - -const struct file_operations proc_file_operations = { - .llseek = proc_file_lseek, - .read = proc_file_read, -}; - static loff_t proc_reg_llseek(struct file *file, loff_t offset, int whence) { struct proc_dir_entry *pde = PDE(file_inode(file)); -- cgit v1.2.3