#include <linux/fs.h>
#include <linux/namei.h>
#include <linux/xattr.h>
#include <linux/security.h>
#include <linux/cred.h>
#include <linux/module.h>
#include <linux/posix_acl.h>
#include <linux/posix_acl_xattr.h>
#include <linux/atomic.h>
#include <linux/ratelimit.h>
#include <linux/backing-file.h>
#include "overlayfs.h"
static unsigned short ovl_redirect_max = …;
module_param_named(redirect_max, ovl_redirect_max, ushort, 0644);
MODULE_PARM_DESC(…) …;
static int ovl_set_redirect(struct dentry *dentry, bool samedir);
int ovl_cleanup(struct ovl_fs *ofs, struct inode *wdir, struct dentry *wdentry)
{ … }
struct dentry *ovl_lookup_temp(struct ovl_fs *ofs, struct dentry *workdir)
{ … }
static struct dentry *ovl_whiteout(struct ovl_fs *ofs)
{ … }
int ovl_cleanup_and_whiteout(struct ovl_fs *ofs, struct inode *dir,
struct dentry *dentry)
{ … }
int ovl_mkdir_real(struct ovl_fs *ofs, struct inode *dir,
struct dentry **newdentry, umode_t mode)
{ … }
struct dentry *ovl_create_real(struct ovl_fs *ofs, struct inode *dir,
struct dentry *newdentry, struct ovl_cattr *attr)
{ … }
struct dentry *ovl_create_temp(struct ovl_fs *ofs, struct dentry *workdir,
struct ovl_cattr *attr)
{ … }
static int ovl_set_opaque_xerr(struct dentry *dentry, struct dentry *upper,
int xerr)
{ … }
static int ovl_set_opaque(struct dentry *dentry, struct dentry *upperdentry)
{ … }
static int ovl_instantiate(struct dentry *dentry, struct inode *inode,
struct dentry *newdentry, bool hardlink, struct file *tmpfile)
{ … }
static bool ovl_type_merge(struct dentry *dentry)
{ … }
static bool ovl_type_origin(struct dentry *dentry)
{ … }
static int ovl_create_upper(struct dentry *dentry, struct inode *inode,
struct ovl_cattr *attr)
{ … }
static struct dentry *ovl_clear_empty(struct dentry *dentry,
struct list_head *list)
{ … }
static int ovl_set_upper_acl(struct ovl_fs *ofs, struct dentry *upperdentry,
const char *acl_name, struct posix_acl *acl)
{ … }
static int ovl_create_over_whiteout(struct dentry *dentry, struct inode *inode,
struct ovl_cattr *cattr)
{ … }
static int ovl_setup_cred_for_create(struct dentry *dentry, struct inode *inode,
umode_t mode, const struct cred *old_cred)
{ … }
static int ovl_create_or_link(struct dentry *dentry, struct inode *inode,
struct ovl_cattr *attr, bool origin)
{ … }
static int ovl_create_object(struct dentry *dentry, int mode, dev_t rdev,
const char *link)
{ … }
static int ovl_create(struct mnt_idmap *idmap, struct inode *dir,
struct dentry *dentry, umode_t mode, bool excl)
{ … }
static int ovl_mkdir(struct mnt_idmap *idmap, struct inode *dir,
struct dentry *dentry, umode_t mode)
{ … }
static int ovl_mknod(struct mnt_idmap *idmap, struct inode *dir,
struct dentry *dentry, umode_t mode, dev_t rdev)
{ … }
static int ovl_symlink(struct mnt_idmap *idmap, struct inode *dir,
struct dentry *dentry, const char *link)
{ … }
static int ovl_set_link_redirect(struct dentry *dentry)
{ … }
static int ovl_link(struct dentry *old, struct inode *newdir,
struct dentry *new)
{ … }
static bool ovl_matches_upper(struct dentry *dentry, struct dentry *upper)
{ … }
static int ovl_remove_and_whiteout(struct dentry *dentry,
struct list_head *list)
{ … }
static int ovl_remove_upper(struct dentry *dentry, bool is_dir,
struct list_head *list)
{ … }
static bool ovl_pure_upper(struct dentry *dentry)
{ … }
static void ovl_drop_nlink(struct dentry *dentry)
{ … }
static int ovl_do_remove(struct dentry *dentry, bool is_dir)
{ … }
static int ovl_unlink(struct inode *dir, struct dentry *dentry)
{ … }
static int ovl_rmdir(struct inode *dir, struct dentry *dentry)
{ … }
static bool ovl_type_merge_or_lower(struct dentry *dentry)
{ … }
static bool ovl_can_move(struct dentry *dentry)
{ … }
static char *ovl_get_redirect(struct dentry *dentry, bool abs_redirect)
{ … }
static bool ovl_need_absolute_redirect(struct dentry *dentry, bool samedir)
{ … }
static int ovl_set_redirect(struct dentry *dentry, bool samedir)
{ … }
static int ovl_rename(struct mnt_idmap *idmap, struct inode *olddir,
struct dentry *old, struct inode *newdir,
struct dentry *new, unsigned int flags)
{ … }
static int ovl_create_tmpfile(struct file *file, struct dentry *dentry,
struct inode *inode, umode_t mode)
{ … }
static int ovl_dummy_open(struct inode *inode, struct file *file)
{ … }
static int ovl_tmpfile(struct mnt_idmap *idmap, struct inode *dir,
struct file *file, umode_t mode)
{ … }
const struct inode_operations ovl_dir_inode_operations = …;