diff options
author | Alexey Dobriyan <adobriyan@sw.ru> | 2008-02-08 13:18:27 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-08 18:22:23 +0100 |
commit | 76df0c25d0c34eba9fbb8a44106ed096553ba0e8 (patch) | |
tree | a68241a860699f952a1cfcf22e50ddbc19bba7c9 /fs/proc/generic.c | |
parent | proc: less LOCK operations during lookup (diff) | |
download | linux-76df0c25d0c34eba9fbb8a44106ed096553ba0e8.tar.xz linux-76df0c25d0c34eba9fbb8a44106ed096553ba0e8.zip |
proc: simplify function prototypes
Move code around so as to reduce the number of forward-declarations.
Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/proc/generic.c')
-rw-r--r-- | fs/proc/generic.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/fs/proc/generic.c b/fs/proc/generic.c index 75cd8d709f7f..1c91eed26451 100644 --- a/fs/proc/generic.c +++ b/fs/proc/generic.c @@ -25,12 +25,6 @@ #include "internal.h" -static ssize_t proc_file_read(struct file *file, char __user *buf, - size_t nbytes, loff_t *ppos); -static ssize_t proc_file_write(struct file *file, const char __user *buffer, - size_t count, loff_t *ppos); -static loff_t proc_file_lseek(struct file *, loff_t, int); - DEFINE_SPINLOCK(proc_subdir_lock); static int proc_match(int len, const char *name, struct proc_dir_entry *de) @@ -40,12 +34,6 @@ static int proc_match(int len, const char *name, struct proc_dir_entry *de) return !memcmp(name, de->name, len); } -static const struct file_operations proc_file_operations = { - .llseek = proc_file_lseek, - .read = proc_file_read, - .write = proc_file_write, -}; - /* buffer size is one page but our output routines use some slack for overruns */ #define PROC_BLOCK_SIZE (PAGE_SIZE - 1024) @@ -233,6 +221,12 @@ proc_file_lseek(struct file *file, loff_t offset, int orig) return retval; } +static const struct file_operations proc_file_operations = { + .llseek = proc_file_lseek, + .read = proc_file_read, + .write = proc_file_write, +}; + static int proc_notify_change(struct dentry *dentry, struct iattr *iattr) { struct inode *inode = dentry->d_inode; |