#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/namei.h>
#include <linux/pagemap.h>
#include <linux/swap.h>
#include <linux/ctype.h>
#include <linux/sched.h>
#include <linux/task_io_accounting_ops.h>
#include "internal.h"
#include "afs_fs.h"
#include "xdr_fs.h"
static struct dentry *afs_lookup(struct inode *dir, struct dentry *dentry,
unsigned int flags);
static int afs_dir_open(struct inode *inode, struct file *file);
static int afs_readdir(struct file *file, struct dir_context *ctx);
static int afs_d_revalidate(struct dentry *dentry, unsigned int flags);
static int afs_d_delete(const struct dentry *dentry);
static void afs_d_iput(struct dentry *dentry, struct inode *inode);
static bool afs_lookup_one_filldir(struct dir_context *ctx, const char *name, int nlen,
loff_t fpos, u64 ino, unsigned dtype);
static bool afs_lookup_filldir(struct dir_context *ctx, const char *name, int nlen,
loff_t fpos, u64 ino, unsigned dtype);
static int afs_create(struct mnt_idmap *idmap, struct inode *dir,
struct dentry *dentry, umode_t mode, bool excl);
static int afs_mkdir(struct mnt_idmap *idmap, struct inode *dir,
struct dentry *dentry, umode_t mode);
static int afs_rmdir(struct inode *dir, struct dentry *dentry);
static int afs_unlink(struct inode *dir, struct dentry *dentry);
static int afs_link(struct dentry *from, struct inode *dir,
struct dentry *dentry);
static int afs_symlink(struct mnt_idmap *idmap, struct inode *dir,
struct dentry *dentry, const char *content);
static int afs_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 bool afs_dir_release_folio(struct folio *folio, gfp_t gfp_flags);
static void afs_dir_invalidate_folio(struct folio *folio, size_t offset,
size_t length);
static bool afs_dir_dirty_folio(struct address_space *mapping,
struct folio *folio)
{ … }
const struct file_operations afs_dir_file_operations = …;
const struct inode_operations afs_dir_inode_operations = …;
const struct address_space_operations afs_dir_aops = …;
const struct dentry_operations afs_fs_dentry_operations = …;
struct afs_lookup_one_cookie { … };
struct afs_lookup_cookie { … };
static void afs_dir_read_cleanup(struct afs_read *req)
{ … }
static bool afs_dir_check_folio(struct afs_vnode *dvnode, struct folio *folio,
loff_t i_size)
{ … }
static void afs_dir_dump(struct afs_vnode *dvnode, struct afs_read *req)
{ … }
static int afs_dir_check(struct afs_vnode *dvnode, struct afs_read *req)
{ … }
static int afs_dir_open(struct inode *inode, struct file *file)
{ … }
static struct afs_read *afs_read_dir(struct afs_vnode *dvnode, struct key *key)
__acquires(&dvnode->validate_lock)
{ … }
static int afs_dir_iterate_block(struct afs_vnode *dvnode,
struct dir_context *ctx,
union afs_xdr_dir_block *block,
unsigned blkoff)
{ … }
static int afs_dir_iterate(struct inode *dir, struct dir_context *ctx,
struct key *key, afs_dataversion_t *_dir_version)
{ … }
static int afs_readdir(struct file *file, struct dir_context *ctx)
{ … }
static bool afs_lookup_one_filldir(struct dir_context *ctx, const char *name,
int nlen, loff_t fpos, u64 ino, unsigned dtype)
{ … }
static int afs_do_lookup_one(struct inode *dir, struct dentry *dentry,
struct afs_fid *fid, struct key *key,
afs_dataversion_t *_dir_version)
{ … }
static bool afs_lookup_filldir(struct dir_context *ctx, const char *name,
int nlen, loff_t fpos, u64 ino, unsigned dtype)
{ … }
static void afs_do_lookup_success(struct afs_operation *op)
{ … }
static const struct afs_operation_ops afs_inline_bulk_status_operation = …;
static const struct afs_operation_ops afs_lookup_fetch_status_operation = …;
static bool afs_server_supports_ibulk(struct afs_vnode *dvnode)
{ … }
static struct inode *afs_do_lookup(struct inode *dir, struct dentry *dentry,
struct key *key)
{ … }
static struct dentry *afs_lookup_atsys(struct inode *dir, struct dentry *dentry,
struct key *key)
{ … }
static struct dentry *afs_lookup(struct inode *dir, struct dentry *dentry,
unsigned int flags)
{ … }
static int afs_d_revalidate_rcu(struct dentry *dentry)
{ … }
static int afs_d_revalidate(struct dentry *dentry, unsigned int flags)
{ … }
static int afs_d_delete(const struct dentry *dentry)
{ … }
static void afs_d_iput(struct dentry *dentry, struct inode *inode)
{ … }
void afs_d_release(struct dentry *dentry)
{ … }
void afs_check_for_remote_deletion(struct afs_operation *op)
{ … }
static void afs_vnode_new_inode(struct afs_operation *op)
{ … }
static void afs_create_success(struct afs_operation *op)
{ … }
static void afs_create_edit_dir(struct afs_operation *op)
{ … }
static void afs_create_put(struct afs_operation *op)
{ … }
static const struct afs_operation_ops afs_mkdir_operation = …;
static int afs_mkdir(struct mnt_idmap *idmap, struct inode *dir,
struct dentry *dentry, umode_t mode)
{ … }
static void afs_dir_remove_subdir(struct dentry *dentry)
{ … }
static void afs_rmdir_success(struct afs_operation *op)
{ … }
static void afs_rmdir_edit_dir(struct afs_operation *op)
{ … }
static void afs_rmdir_put(struct afs_operation *op)
{ … }
static const struct afs_operation_ops afs_rmdir_operation = …;
static int afs_rmdir(struct inode *dir, struct dentry *dentry)
{ … }
static void afs_dir_remove_link(struct afs_operation *op)
{ … }
static void afs_unlink_success(struct afs_operation *op)
{ … }
static void afs_unlink_edit_dir(struct afs_operation *op)
{ … }
static void afs_unlink_put(struct afs_operation *op)
{ … }
static const struct afs_operation_ops afs_unlink_operation = …;
static int afs_unlink(struct inode *dir, struct dentry *dentry)
{ … }
static const struct afs_operation_ops afs_create_operation = …;
static int afs_create(struct mnt_idmap *idmap, struct inode *dir,
struct dentry *dentry, umode_t mode, bool excl)
{ … }
static void afs_link_success(struct afs_operation *op)
{ … }
static void afs_link_put(struct afs_operation *op)
{ … }
static const struct afs_operation_ops afs_link_operation = …;
static int afs_link(struct dentry *from, struct inode *dir,
struct dentry *dentry)
{ … }
static const struct afs_operation_ops afs_symlink_operation = …;
static int afs_symlink(struct mnt_idmap *idmap, struct inode *dir,
struct dentry *dentry, const char *content)
{ … }
static void afs_rename_success(struct afs_operation *op)
{ … }
static void afs_rename_edit_dir(struct afs_operation *op)
{ … }
static void afs_rename_put(struct afs_operation *op)
{ … }
static const struct afs_operation_ops afs_rename_operation = …;
static int afs_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 bool afs_dir_release_folio(struct folio *folio, gfp_t gfp_flags)
{ … }
static void afs_dir_invalidate_folio(struct folio *folio, size_t offset,
size_t length)
{ … }