summaryrefslogtreecommitdiff
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-10-01 10:29:26 +0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-01 11:39:33 +0400
commitd6cbd281d189977b38eac7eb2a4678de19b6b483 (patch)
treef853d303687275cd4328bfac53780b7c7c2c67ef /include/linux/fs.h
parent65da4d81f48e092f71feaf04bf2ccd096b5a5171 (diff)
downloadlinux-d6cbd281d189977b38eac7eb2a4678de19b6b483.tar.xz
[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.h3
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)
atomic_inc(&file->f_dentry->d_inode->i_writecount);
}
extern int do_pipe(int *);
+extern struct file *create_read_pipe(struct file *f);
+extern struct file *create_write_pipe(void);
+extern void free_write_pipe(struct file *);
extern int open_namei(int dfd, const char *, int, int, struct nameidata *);
extern int may_open(struct nameidata *, int, int);