From 183266f26f45a47958afb5c9aa1b3d4651e2eb8c Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 17 Jun 2018 14:15:10 -0400 Subject: new helper: alloc_file_clone() alloc_file_clone(old_file, mode, ops): create a new struct file with ->f_path equal to that of old_file. pipe converted. Acked-by: Linus Torvalds Signed-off-by: Al Viro --- include/linux/file.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux/file.h') diff --git a/include/linux/file.h b/include/linux/file.h index 5b25388f2f79..60914843c737 100644 --- a/include/linux/file.h +++ b/include/linux/file.h @@ -23,6 +23,8 @@ extern struct file *alloc_file(const struct path *, int flags, const struct file_operations *fop); extern struct file *alloc_file_pseudo(struct inode *, struct vfsmount *, const char *, int flags, const struct file_operations *); +extern struct file *alloc_file_clone(struct file *, int flags, + const struct file_operations *); static inline void fput_light(struct file *file, int fput_needed) { -- cgit