summaryrefslogtreecommitdiff
path: root/include/linux/file.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2018-06-17 21:15:10 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2018-07-12 17:04:28 +0300
commit183266f26f45a47958afb5c9aa1b3d4651e2eb8c (patch)
treec420683235aab835020701a456a62cd786a02c68 /include/linux/file.h
parent152b6372c90630ef6787334e84cdddbcf8beb241 (diff)
downloadlinux-183266f26f45a47958afb5c9aa1b3d4651e2eb8c.tar.xz
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 <torvalds@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/file.h')
-rw-r--r--include/linux/file.h2
1 files changed, 2 insertions, 0 deletions
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)
{