#include <linux/fs.h>
#include <linux/stat.h>
#include <linux/slab.h>
#include <linux/pagemap.h>
#include <linux/freezer.h>
#include <linux/sched/signal.h>
#include <linux/wait_bit.h>
#include <linux/fiemap.h>
#include <asm/div64.h>
#include "cifsfs.h"
#include "cifspdu.h"
#include "cifsglob.h"
#include "cifsproto.h"
#include "smb2proto.h"
#include "cifs_debug.h"
#include "cifs_fs_sb.h"
#include "cifs_unicode.h"
#include "fscache.h"
#include "fs_context.h"
#include "cifs_ioctl.h"
#include "cached_dir.h"
#include "reparse.h"
static void cifs_set_netfs_context(struct inode *inode)
{ … }
static void cifs_set_ops(struct inode *inode)
{ … }
static void
cifs_revalidate_cache(struct inode *inode, struct cifs_fattr *fattr)
{ … }
static void
cifs_nlink_fattr_to_inode(struct inode *inode, struct cifs_fattr *fattr)
{ … }
int
cifs_fattr_to_inode(struct inode *inode, struct cifs_fattr *fattr,
bool from_readdir)
{ … }
void
cifs_fill_uniqueid(struct super_block *sb, struct cifs_fattr *fattr)
{ … }
void
cifs_unix_basic_to_fattr(struct cifs_fattr *fattr, FILE_UNIX_BASIC_INFO *info,
struct cifs_sb_info *cifs_sb)
{ … }
static void cifs_create_junction_fattr(struct cifs_fattr *fattr,
struct super_block *sb)
{ … }
static int update_inode_info(struct super_block *sb,
struct cifs_fattr *fattr,
struct inode **inode)
{ … }
#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
static int
cifs_get_file_info_unix(struct file *filp)
{ … }
static int cifs_get_unix_fattr(const unsigned char *full_path,
struct super_block *sb,
struct cifs_fattr *fattr,
struct inode **pinode,
const unsigned int xid)
{ … }
int cifs_get_inode_info_unix(struct inode **pinode,
const unsigned char *full_path,
struct super_block *sb, unsigned int xid)
{ … }
#else
static inline int cifs_get_unix_fattr(const unsigned char *full_path,
struct super_block *sb,
struct cifs_fattr *fattr,
struct inode **pinode,
const unsigned int xid)
{
return -EOPNOTSUPP;
}
int cifs_get_inode_info_unix(struct inode **pinode,
const unsigned char *full_path,
struct super_block *sb, unsigned int xid)
{
return -EOPNOTSUPP;
}
#endif
static int
cifs_sfu_type(struct cifs_fattr *fattr, const char *path,
struct cifs_sb_info *cifs_sb, unsigned int xid)
{ … }
#define SFBITS_MASK …
static int cifs_sfu_mode(struct cifs_fattr *fattr, const unsigned char *path,
struct cifs_sb_info *cifs_sb, unsigned int xid)
{ … }
static void smb311_posix_info_to_fattr(struct cifs_fattr *fattr,
struct cifs_open_info_data *data,
struct super_block *sb)
{ … }
static void cifs_open_info_to_fattr(struct cifs_fattr *fattr,
struct cifs_open_info_data *data,
struct super_block *sb)
{ … }
static int
cifs_get_file_info(struct file *filp)
{ … }
static __u64 simple_hashstr(const char *str)
{ … }
#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
static int
cifs_backup_query_path_info(int xid,
struct cifs_tcon *tcon,
struct super_block *sb,
const char *full_path,
void **resp_buf,
FILE_ALL_INFO **data)
{ … }
#endif
static void cifs_set_fattr_ino(int xid, struct cifs_tcon *tcon, struct super_block *sb,
struct inode **inode, const char *full_path,
struct cifs_open_info_data *data, struct cifs_fattr *fattr)
{ … }
static inline bool is_inode_cache_good(struct inode *ino)
{ … }
static int reparse_info_to_fattr(struct cifs_open_info_data *data,
struct super_block *sb,
const unsigned int xid,
struct cifs_tcon *tcon,
const char *full_path,
struct cifs_fattr *fattr)
{ … }
static int cifs_get_fattr(struct cifs_open_info_data *data,
struct super_block *sb, int xid,
const struct cifs_fid *fid,
struct cifs_fattr *fattr,
struct inode **inode,
const char *full_path)
{ … }
int cifs_get_inode_info(struct inode **inode,
const char *full_path,
struct cifs_open_info_data *data,
struct super_block *sb, int xid,
const struct cifs_fid *fid)
{ … }
static int smb311_posix_get_fattr(struct cifs_open_info_data *data,
struct cifs_fattr *fattr,
const char *full_path,
struct super_block *sb,
const unsigned int xid)
{ … }
int smb311_posix_get_inode_info(struct inode **inode,
const char *full_path,
struct cifs_open_info_data *data,
struct super_block *sb,
const unsigned int xid)
{ … }
static const struct inode_operations cifs_ipc_inode_ops = …;
static int
cifs_find_inode(struct inode *inode, void *opaque)
{ … }
static int
cifs_init_inode(struct inode *inode, void *opaque)
{ … }
static bool
inode_has_hashed_dentries(struct inode *inode)
{ … }
struct inode *
cifs_iget(struct super_block *sb, struct cifs_fattr *fattr)
{ … }
struct inode *cifs_root_iget(struct super_block *sb)
{ … }
int
cifs_set_file_info(struct inode *inode, struct iattr *attrs, unsigned int xid,
const char *full_path, __u32 dosattr)
{ … }
#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
int
cifs_rename_pending_delete(const char *full_path, struct dentry *dentry,
const unsigned int xid)
{ … }
#endif
static void
cifs_drop_nlink(struct inode *inode)
{ … }
int cifs_unlink(struct inode *dir, struct dentry *dentry)
{ … }
static int
cifs_mkdir_qinfo(struct inode *parent, struct dentry *dentry, umode_t mode,
const char *full_path, struct cifs_sb_info *cifs_sb,
struct cifs_tcon *tcon, const unsigned int xid)
{ … }
#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
static int
cifs_posix_mkdir(struct inode *inode, struct dentry *dentry, umode_t mode,
const char *full_path, struct cifs_sb_info *cifs_sb,
struct cifs_tcon *tcon, const unsigned int xid)
{ … }
#endif
int cifs_mkdir(struct mnt_idmap *idmap, struct inode *inode,
struct dentry *direntry, umode_t mode)
{ … }
int cifs_rmdir(struct inode *inode, struct dentry *direntry)
{ … }
static int
cifs_do_rename(const unsigned int xid, struct dentry *from_dentry,
const char *from_path, struct dentry *to_dentry,
const char *to_path)
{ … }
int
cifs_rename2(struct mnt_idmap *idmap, struct inode *source_dir,
struct dentry *source_dentry, struct inode *target_dir,
struct dentry *target_dentry, unsigned int flags)
{ … }
static bool
cifs_dentry_needs_reval(struct dentry *dentry)
{ … }
static int
cifs_wait_bit_killable(struct wait_bit_key *key, int mode)
{ … }
int
cifs_revalidate_mapping(struct inode *inode)
{ … }
int
cifs_zap_mapping(struct inode *inode)
{ … }
int cifs_revalidate_file_attr(struct file *filp)
{ … }
int cifs_revalidate_dentry_attr(struct dentry *dentry)
{ … }
int cifs_revalidate_file(struct file *filp)
{ … }
int cifs_revalidate_dentry(struct dentry *dentry)
{ … }
int cifs_getattr(struct mnt_idmap *idmap, const struct path *path,
struct kstat *stat, u32 request_mask, unsigned int flags)
{ … }
int cifs_fiemap(struct inode *inode, struct fiemap_extent_info *fei, u64 start,
u64 len)
{ … }
int cifs_truncate_page(struct address_space *mapping, loff_t from)
{ … }
void cifs_setsize(struct inode *inode, loff_t offset)
{ … }
static int
cifs_set_file_size(struct inode *inode, struct iattr *attrs,
unsigned int xid, const char *full_path, struct dentry *dentry)
{ … }
#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
static int
cifs_setattr_unix(struct dentry *direntry, struct iattr *attrs)
{ … }
#endif
static int
cifs_setattr_nounix(struct dentry *direntry, struct iattr *attrs)
{ … }
int
cifs_setattr(struct mnt_idmap *idmap, struct dentry *direntry,
struct iattr *attrs)
{ … }