diff options
author | Andi Kleen <ak@suse.de> | 2006-10-01 02:29:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-01 03:39:33 -0400 |
commit | d6cbd281d189977b38eac7eb2a4678de19b6b483 (patch) | |
tree | f853d303687275cd4328bfac53780b7c7c2c67ef /include/linux/fs.h | |
parent | 65da4d81f48e092f71feaf04bf2ccd096b5a5171 (diff) |
[PATCH] Some cleanup in the pipe code
Split the big and hard to read do_pipe function into smaller pieces.
This creates new create_write_pipe/free_write_pipe/create_read_pipe
functions. These functions are made global so that they can be used by
other parts of the kernel.
The resulting code is more generic and easier to read and has cleaner error
handling and less gotos.
[akpm@osdl.org: cleanup]
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 3493d2828f7d..2e29a2edaeec 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1641,6 +1641,9 @@ static inline void allow_write_access(struct file *file) | |||
1641 | atomic_inc(&file->f_dentry->d_inode->i_writecount); | 1641 | atomic_inc(&file->f_dentry->d_inode->i_writecount); |
1642 | } | 1642 | } |
1643 | extern int do_pipe(int *); | 1643 | extern int do_pipe(int *); |
1644 | extern struct file *create_read_pipe(struct file *f); | ||
1645 | extern struct file *create_write_pipe(void); | ||
1646 | extern void free_write_pipe(struct file *); | ||
1644 | 1647 | ||
1645 | extern int open_namei(int dfd, const char *, int, int, struct nameidata *); | 1648 | extern int open_namei(int dfd, const char *, int, int, struct nameidata *); |
1646 | extern int may_open(struct nameidata *, int, int); | 1649 | extern int may_open(struct nameidata *, int, int); |