diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-06-10 14:24:38 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-07-14 16:33:52 +0400 |
commit | 2a027e7a1873812240cbdac0f55c4734ff0042a5 (patch) | |
tree | 0442aad91b63d57dcdb9090ce9e0c66cdedad4cb /fs/open.c | |
parent | 96b7e579addd3cdc806c1667bf5b6b126070827c (diff) | |
download | linux-exynos-2a027e7a1873812240cbdac0f55c4734ff0042a5.tar.gz linux-exynos-2a027e7a1873812240cbdac0f55c4734ff0042a5.tar.bz2 linux-exynos-2a027e7a1873812240cbdac0f55c4734ff0042a5.zip |
fold __dentry_open() into its sole caller
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/open.c')
-rw-r--r-- | fs/open.c | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/fs/open.c b/fs/open.c index 1241c597d317..28fbacbd5e31 100644 --- a/fs/open.c +++ b/fs/open.c @@ -752,26 +752,6 @@ cleanup_file: return error; } -static struct file *__dentry_open(struct dentry *dentry, struct vfsmount *mnt, - struct file *f, - int (*open)(struct inode *, struct file *), - const struct cred *cred) -{ - int error; - error = do_dentry_open(dentry, mnt, f, open, cred); - if (!error) { - error = open_check_o_direct(f); - if (error) { - fput(f); - f = ERR_PTR(error); - } - } else { - put_filp(f); - f = ERR_PTR(error); - } - return f; -} - /** * finish_open - finish opening a file * @od: opaque open data @@ -841,7 +821,18 @@ struct file *dentry_open(struct dentry *dentry, struct vfsmount *mnt, int flags, } f->f_flags = flags; - return __dentry_open(dentry, mnt, f, NULL, cred); + error = do_dentry_open(dentry, mnt, f, NULL, cred); + if (!error) { + error = open_check_o_direct(f); + if (error) { + fput(f); + f = ERR_PTR(error); + } + } else { + put_filp(f); + f = ERR_PTR(error); + } + return f; } EXPORT_SYMBOL(dentry_open); |