diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2018-07-18 10:46:05 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2018-07-18 10:46:05 +0200 |
commit | 9951934d76b04570d4ccbc8d768530b6b7d69edf (patch) | |
tree | ab5436f2e8382942e0352d57659110a105c007dd /include/linux/fs.h | |
parent | 67810693077afc1ebf9e1646af300436cb8103c2 (diff) | |
parent | 2abc77af89e17582db9039293c8ac881c8c96d79 (diff) | |
download | talos-op-linux-9951934d76b04570d4ccbc8d768530b6b7d69edf.tar.gz talos-op-linux-9951934d76b04570d4ccbc8d768530b6b7d69edf.zip |
Merge branch 'for-ovl' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs into overlayfs-next
This gives us the open_with_fake_path() helper that is needed for stacked
open files in overlay and mmap in particular.
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 5c91108846db..4ff7b7012186 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -148,6 +148,8 @@ typedef int (dio_iodone_t)(struct kiocb *iocb, loff_t offset, /* Has write method(s) */ #define FMODE_CAN_WRITE ((__force fmode_t)0x40000) +#define FMODE_OPENED ((__force fmode_t)0x80000) + /* File was opened by fanotify and shouldn't generate fanotify events */ #define FMODE_NONOTIFY ((__force fmode_t)0x4000000) @@ -2422,6 +2424,12 @@ extern struct file *filp_open(const char *, int, umode_t); extern struct file *file_open_root(struct dentry *, struct vfsmount *, const char *, int, umode_t); extern struct file * dentry_open(const struct path *, int, const struct cred *); +extern struct file * open_with_fake_path(const struct path *, int, + struct inode*, const struct cred *); +static inline struct file *file_clone_open(struct file *file) +{ + return dentry_open(&file->f_path, file->f_flags, file->f_cred); +} extern int filp_close(struct file *, fl_owner_t id); extern struct filename *getname_flags(const char __user *, int, int *); |