#include <linux/file.h>
#include <linux/vmalloc.h>
#include <linux/pagemap.h>
#include <linux/dcache.h>
#include <linux/namei.h>
#include <linux/mount.h>
#include <linux/fs_stack.h>
#include <linux/slab.h>
#include <linux/xattr.h>
#include <linux/posix_acl.h>
#include <linux/posix_acl_xattr.h>
#include <linux/fileattr.h>
#include <asm/unaligned.h>
#include "ecryptfs_kernel.h"
static int lock_parent(struct dentry *dentry,
struct dentry **lower_dentry,
struct inode **lower_dir)
{ … }
static int ecryptfs_inode_test(struct inode *inode, void *lower_inode)
{ … }
static int ecryptfs_inode_set(struct inode *inode, void *opaque)
{ … }
static struct inode *__ecryptfs_get_inode(struct inode *lower_inode,
struct super_block *sb)
{ … }
struct inode *ecryptfs_get_inode(struct inode *lower_inode,
struct super_block *sb)
{ … }
static int ecryptfs_interpose(struct dentry *lower_dentry,
struct dentry *dentry, struct super_block *sb)
{ … }
static int ecryptfs_do_unlink(struct inode *dir, struct dentry *dentry,
struct inode *inode)
{ … }
static struct inode *
ecryptfs_do_create(struct inode *directory_inode,
struct dentry *ecryptfs_dentry, umode_t mode)
{ … }
int ecryptfs_initialize_file(struct dentry *ecryptfs_dentry,
struct inode *ecryptfs_inode)
{ … }
static int
ecryptfs_create(struct mnt_idmap *idmap,
struct inode *directory_inode, struct dentry *ecryptfs_dentry,
umode_t mode, bool excl)
{ … }
static int ecryptfs_i_size_read(struct dentry *dentry, struct inode *inode)
{ … }
static struct dentry *ecryptfs_lookup_interpose(struct dentry *dentry,
struct dentry *lower_dentry)
{ … }
static struct dentry *ecryptfs_lookup(struct inode *ecryptfs_dir_inode,
struct dentry *ecryptfs_dentry,
unsigned int flags)
{ … }
static int ecryptfs_link(struct dentry *old_dentry, struct inode *dir,
struct dentry *new_dentry)
{ … }
static int ecryptfs_unlink(struct inode *dir, struct dentry *dentry)
{ … }
static int ecryptfs_symlink(struct mnt_idmap *idmap,
struct inode *dir, struct dentry *dentry,
const char *symname)
{ … }
static int ecryptfs_mkdir(struct mnt_idmap *idmap, struct inode *dir,
struct dentry *dentry, umode_t mode)
{ … }
static int ecryptfs_rmdir(struct inode *dir, struct dentry *dentry)
{ … }
static int
ecryptfs_mknod(struct mnt_idmap *idmap, struct inode *dir,
struct dentry *dentry, umode_t mode, dev_t dev)
{ … }
static int
ecryptfs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
struct dentry *old_dentry, struct inode *new_dir,
struct dentry *new_dentry, unsigned int flags)
{ … }
static char *ecryptfs_readlink_lower(struct dentry *dentry, size_t *bufsiz)
{ … }
static const char *ecryptfs_get_link(struct dentry *dentry,
struct inode *inode,
struct delayed_call *done)
{ … }
static loff_t
upper_size_to_lower_size(struct ecryptfs_crypt_stat *crypt_stat,
loff_t upper_size)
{ … }
static int truncate_upper(struct dentry *dentry, struct iattr *ia,
struct iattr *lower_ia)
{ … }
static int ecryptfs_inode_newsize_ok(struct inode *inode, loff_t offset)
{ … }
int ecryptfs_truncate(struct dentry *dentry, loff_t new_length)
{ … }
static int
ecryptfs_permission(struct mnt_idmap *idmap, struct inode *inode,
int mask)
{ … }
static int ecryptfs_setattr(struct mnt_idmap *idmap,
struct dentry *dentry, struct iattr *ia)
{ … }
static int ecryptfs_getattr_link(struct mnt_idmap *idmap,
const struct path *path, struct kstat *stat,
u32 request_mask, unsigned int flags)
{ … }
static int ecryptfs_do_getattr(const struct path *path, struct kstat *stat,
u32 request_mask, unsigned int flags)
{ … }
static int ecryptfs_getattr(struct mnt_idmap *idmap,
const struct path *path, struct kstat *stat,
u32 request_mask, unsigned int flags)
{ … }
int
ecryptfs_setxattr(struct dentry *dentry, struct inode *inode,
const char *name, const void *value,
size_t size, int flags)
{ … }
ssize_t
ecryptfs_getxattr_lower(struct dentry *lower_dentry, struct inode *lower_inode,
const char *name, void *value, size_t size)
{ … }
static ssize_t
ecryptfs_getxattr(struct dentry *dentry, struct inode *inode,
const char *name, void *value, size_t size)
{ … }
static ssize_t
ecryptfs_listxattr(struct dentry *dentry, char *list, size_t size)
{ … }
static int ecryptfs_removexattr(struct dentry *dentry, struct inode *inode,
const char *name)
{ … }
static int ecryptfs_fileattr_get(struct dentry *dentry, struct fileattr *fa)
{ … }
static int ecryptfs_fileattr_set(struct mnt_idmap *idmap,
struct dentry *dentry, struct fileattr *fa)
{ … }
static struct posix_acl *ecryptfs_get_acl(struct mnt_idmap *idmap,
struct dentry *dentry, int type)
{ … }
static int ecryptfs_set_acl(struct mnt_idmap *idmap,
struct dentry *dentry, struct posix_acl *acl,
int type)
{ … }
const struct inode_operations ecryptfs_symlink_iops = …;
const struct inode_operations ecryptfs_dir_iops = …;
const struct inode_operations ecryptfs_main_iops = …;
static int ecryptfs_xattr_get(const struct xattr_handler *handler,
struct dentry *dentry, struct inode *inode,
const char *name, void *buffer, size_t size)
{ … }
static int ecryptfs_xattr_set(const struct xattr_handler *handler,
struct mnt_idmap *idmap,
struct dentry *dentry, struct inode *inode,
const char *name, const void *value, size_t size,
int flags)
{ … }
static const struct xattr_handler ecryptfs_xattr_handler = …;
const struct xattr_handler * const ecryptfs_xattr_handlers[] = …;