#include <linux/cred.h>
#include <linux/file.h>
#include <linux/mount.h>
#include <linux/xattr.h>
#include <linux/uio.h>
#include <linux/uaccess.h>
#include <linux/security.h>
#include <linux/fs.h>
#include <linux/backing-file.h>
#include "overlayfs.h"
static char ovl_whatisit(struct inode *inode, struct inode *realinode)
{ … }
static struct file *ovl_open_realfile(const struct file *file,
const struct path *realpath)
{ … }
#define OVL_SETFL_MASK …
static int ovl_change_flags(struct file *file, unsigned int flags)
{ … }
static int ovl_real_fdget_meta(const struct file *file, struct fd *real,
bool allow_meta)
{ … }
static int ovl_real_fdget(const struct file *file, struct fd *real)
{ … }
static int ovl_open(struct inode *inode, struct file *file)
{ … }
static int ovl_release(struct inode *inode, struct file *file)
{ … }
static loff_t ovl_llseek(struct file *file, loff_t offset, int whence)
{ … }
static void ovl_file_modified(struct file *file)
{ … }
static void ovl_file_accessed(struct file *file)
{ … }
static ssize_t ovl_read_iter(struct kiocb *iocb, struct iov_iter *iter)
{ … }
static ssize_t ovl_write_iter(struct kiocb *iocb, struct iov_iter *iter)
{ … }
static ssize_t ovl_splice_read(struct file *in, loff_t *ppos,
struct pipe_inode_info *pipe, size_t len,
unsigned int flags)
{ … }
static ssize_t ovl_splice_write(struct pipe_inode_info *pipe, struct file *out,
loff_t *ppos, size_t len, unsigned int flags)
{ … }
static int ovl_fsync(struct file *file, loff_t start, loff_t end, int datasync)
{ … }
static int ovl_mmap(struct file *file, struct vm_area_struct *vma)
{ … }
static long ovl_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
{ … }
static int ovl_fadvise(struct file *file, loff_t offset, loff_t len, int advice)
{ … }
enum ovl_copyop { … };
static loff_t ovl_copyfile(struct file *file_in, loff_t pos_in,
struct file *file_out, loff_t pos_out,
loff_t len, unsigned int flags, enum ovl_copyop op)
{ … }
static ssize_t ovl_copy_file_range(struct file *file_in, loff_t pos_in,
struct file *file_out, loff_t pos_out,
size_t len, unsigned int flags)
{ … }
static loff_t ovl_remap_file_range(struct file *file_in, loff_t pos_in,
struct file *file_out, loff_t pos_out,
loff_t len, unsigned int remap_flags)
{ … }
static int ovl_flush(struct file *file, fl_owner_t id)
{ … }
const struct file_operations ovl_file_operations = …;