[PATCH] merge open_namei() and do_filp_open()
authorChristoph Hellwig <hch@lst.de>
Fri, 15 Feb 2008 22:37:28 +0000 (14:37 -0800)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 19 Apr 2008 04:25:32 +0000 (00:25 -0400)
commita70e65df8812c52252fa07a2eb92a46451a4427f
treeb8154bebeb898743e89aeeea5971b410c7e49bf7
parentd57999e1527f0b0c818846dcba5a23015beb4823
[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>
fs/namei.c
fs/open.c
include/linux/fs.h