diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2018-06-08 11:19:32 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2018-07-10 23:29:03 -0400 |
commit | 19f391eb05b8b005f2907ddc8f284487b446abf3 (patch) | |
tree | a319e8448de7c9f48c7fcd9f163f3e34f9bf6a34 /fs/open.c | |
parent | e8cff84faa4ddb6716caed085f515fbb1d856099 (diff) | |
download | linux-riscv-19f391eb05b8b005f2907ddc8f284487b446abf3.tar.gz linux-riscv-19f391eb05b8b005f2907ddc8f284487b446abf3.tar.bz2 linux-riscv-19f391eb05b8b005f2907ddc8f284487b446abf3.zip |
turn filp_clone_open() into inline wrapper for dentry_open()
it's exactly the same thing as
dentry_open(&file->f_path, file->f_flags, file->f_cred)
... and rename it to file_clone_open(), while we are at it.
'filp' naming convention is bogus; sure, it's "file pointer",
but we generally don't do that kind of Hungarian notation.
Some of the instances have too many callers to touch, but this
one has only two, so let's sanitize it while we can...
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/open.c')
-rw-r--r-- | fs/open.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/fs/open.c b/fs/open.c index d0e955b558ad..76c56966e297 100644 --- a/fs/open.c +++ b/fs/open.c @@ -1063,26 +1063,6 @@ struct file *file_open_root(struct dentry *dentry, struct vfsmount *mnt, } EXPORT_SYMBOL(file_open_root); -struct file *filp_clone_open(struct file *oldfile) -{ - struct file *file; - int retval; - - file = get_empty_filp(); - if (IS_ERR(file)) - return file; - - file->f_flags = oldfile->f_flags; - retval = vfs_open(&oldfile->f_path, file, oldfile->f_cred); - if (retval) { - put_filp(file); - return ERR_PTR(retval); - } - - return file; -} -EXPORT_SYMBOL(filp_clone_open); - long do_sys_open(int dfd, const char __user *filename, int flags, umode_t mode) { struct open_flags op; |