aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2008-02-15 17:37:28 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2008-04-19 00:25:32 -0400
commita70e65df8812c52252fa07a2eb92a46451a4427f (patch)
treeb8154bebeb898743e89aeeea5971b410c7e49bf7 /include/linux
parentd57999e1527f0b0c818846dcba5a23015beb4823 (diff)
[PATCH] merge open_namei() and do_filp_open()
open_namei() will, in the future, need to take mount write counts over its creation and truncation (via may_open()) operations. It needs to keep these write counts until any potential filp that is created gets __fput()'d. This gets complicated in the error handling and becomes very murky as to how far open_namei() actually got, and whether or not that mount write count was taken. That makes it a bad interface. All that the current do_filp_open() really does is allocate the nameidata on the stack, then call open_namei(). So, this merges those two functions and moves filp_open() over to namei.c so it can be close to its buddy: do_filp_open(). It also gets a kerneldoc comment in the process. Acked-by: Al Viro <viro@ZenIV.linux.org.uk> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Hansen <haveblue@us.ibm.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/fs.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index b84b848431f2..013b9c2b88e6 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1735,7 +1735,8 @@ extern struct file *create_read_pipe(struct file *f);
1735extern struct file *create_write_pipe(void); 1735extern struct file *create_write_pipe(void);
1736extern void free_write_pipe(struct file *); 1736extern void free_write_pipe(struct file *);
1737 1737
1738extern int open_namei(int dfd, const char *, int, int, struct nameidata *); 1738extern struct file *do_filp_open(int dfd, const char *pathname,
1739 int open_flag, int mode);
1739extern int may_open(struct nameidata *, int, int); 1740extern int may_open(struct nameidata *, int, int);
1740 1741
1741extern int kernel_read(struct file *, unsigned long, char *, unsigned long); 1742extern int kernel_read(struct file *, unsigned long, char *, unsigned long);