fs: add filp_clone_open API

I need an API that allows me to obtain a clone of the current file
pointer to pass in to an exec handler.  I've labelled this as an
internal API because I can't see how it would be useful outside of the
fs subsystem.  The use case will be a persistent binfmt_misc handler.

Signed-off-by: James Bottomley <[email protected]>
Acked-by: Serge Hallyn <[email protected]>
Acked-by: Jan Kara <[email protected]>
This commit is contained in:
James Bottomley 2016-02-17 16:49:38 -08:00
commit 9a08c352d0
2 changed files with 21 additions and 0 deletions

View file

@ -108,6 +108,7 @@ extern long do_handle_open(int mountdirfd,
struct file_handle __user *ufh, int open_flag);
extern int open_check_o_direct(struct file *f);
extern int vfs_open(const struct path *, struct file *, const struct cred *);
extern struct file *filp_clone_open(struct file *);
/*
* inode.c