dect
/
linux-2.6
Archived
13
0
Fork 0

[CIFS] Rename three structures to avoid camel case

secMode to sec_mode
and
cifsTconInfo to cifs_tcon
and
cifsSesInfo to cifs_ses

Signed-off-by: Steve French <sfrench@us.ibm.com>
This commit is contained in:
Steve French 2011-05-27 04:34:02 +00:00
parent 07cc6cf9ef
commit 96daf2b091
24 changed files with 353 additions and 353 deletions

View File

@ -146,7 +146,7 @@ static char *extract_sharename(const char *treename)
static uint16_t cifs_super_get_key(const void *cookie_netfs_data, void *buffer, static uint16_t cifs_super_get_key(const void *cookie_netfs_data, void *buffer,
uint16_t maxbuf) uint16_t maxbuf)
{ {
const struct cifsTconInfo *tcon = cookie_netfs_data; const struct cifs_tcon *tcon = cookie_netfs_data;
char *sharename; char *sharename;
uint16_t len; uint16_t len;
@ -173,7 +173,7 @@ cifs_fscache_super_get_aux(const void *cookie_netfs_data, void *buffer,
uint16_t maxbuf) uint16_t maxbuf)
{ {
struct cifs_fscache_super_auxdata auxdata; struct cifs_fscache_super_auxdata auxdata;
const struct cifsTconInfo *tcon = cookie_netfs_data; const struct cifs_tcon *tcon = cookie_netfs_data;
memset(&auxdata, 0, sizeof(auxdata)); memset(&auxdata, 0, sizeof(auxdata));
auxdata.resource_id = tcon->resource_id; auxdata.resource_id = tcon->resource_id;
@ -192,7 +192,7 @@ fscache_checkaux cifs_fscache_super_check_aux(void *cookie_netfs_data,
uint16_t datalen) uint16_t datalen)
{ {
struct cifs_fscache_super_auxdata auxdata; struct cifs_fscache_super_auxdata auxdata;
const struct cifsTconInfo *tcon = cookie_netfs_data; const struct cifs_tcon *tcon = cookie_netfs_data;
if (datalen != sizeof(auxdata)) if (datalen != sizeof(auxdata))
return FSCACHE_CHECKAUX_OBSOLETE; return FSCACHE_CHECKAUX_OBSOLETE;

View File

@ -110,8 +110,8 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
struct list_head *tmp1, *tmp2, *tmp3; struct list_head *tmp1, *tmp2, *tmp3;
struct mid_q_entry *mid_entry; struct mid_q_entry *mid_entry;
struct TCP_Server_Info *server; struct TCP_Server_Info *server;
struct cifsSesInfo *ses; struct cifs_ses *ses;
struct cifsTconInfo *tcon; struct cifs_tcon *tcon;
int i, j; int i, j;
__u32 dev_type; __u32 dev_type;
@ -152,7 +152,7 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
tcp_ses_list); tcp_ses_list);
i++; i++;
list_for_each(tmp2, &server->smb_ses_list) { list_for_each(tmp2, &server->smb_ses_list) {
ses = list_entry(tmp2, struct cifsSesInfo, ses = list_entry(tmp2, struct cifs_ses,
smb_ses_list); smb_ses_list);
if ((ses->serverDomain == NULL) || if ((ses->serverDomain == NULL) ||
(ses->serverOS == NULL) || (ses->serverOS == NULL) ||
@ -171,7 +171,7 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
seq_printf(m, "TCP status: %d\n\tLocal Users To " seq_printf(m, "TCP status: %d\n\tLocal Users To "
"Server: %d SecMode: 0x%x Req On Wire: %d", "Server: %d SecMode: 0x%x Req On Wire: %d",
server->tcpStatus, server->srv_count, server->tcpStatus, server->srv_count,
server->secMode, server->sec_mode,
atomic_read(&server->inFlight)); atomic_read(&server->inFlight));
#ifdef CONFIG_CIFS_STATS2 #ifdef CONFIG_CIFS_STATS2
@ -183,7 +183,7 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
seq_puts(m, "\n\tShares:"); seq_puts(m, "\n\tShares:");
j = 0; j = 0;
list_for_each(tmp3, &ses->tcon_list) { list_for_each(tmp3, &ses->tcon_list) {
tcon = list_entry(tmp3, struct cifsTconInfo, tcon = list_entry(tmp3, struct cifs_tcon,
tcon_list); tcon_list);
++j; ++j;
dev_type = le32_to_cpu(tcon->fsDevInfo.DeviceType); dev_type = le32_to_cpu(tcon->fsDevInfo.DeviceType);
@ -256,8 +256,8 @@ static ssize_t cifs_stats_proc_write(struct file *file,
int rc; int rc;
struct list_head *tmp1, *tmp2, *tmp3; struct list_head *tmp1, *tmp2, *tmp3;
struct TCP_Server_Info *server; struct TCP_Server_Info *server;
struct cifsSesInfo *ses; struct cifs_ses *ses;
struct cifsTconInfo *tcon; struct cifs_tcon *tcon;
rc = get_user(c, buffer); rc = get_user(c, buffer);
if (rc) if (rc)
@ -273,11 +273,11 @@ static ssize_t cifs_stats_proc_write(struct file *file,
server = list_entry(tmp1, struct TCP_Server_Info, server = list_entry(tmp1, struct TCP_Server_Info,
tcp_ses_list); tcp_ses_list);
list_for_each(tmp2, &server->smb_ses_list) { list_for_each(tmp2, &server->smb_ses_list) {
ses = list_entry(tmp2, struct cifsSesInfo, ses = list_entry(tmp2, struct cifs_ses,
smb_ses_list); smb_ses_list);
list_for_each(tmp3, &ses->tcon_list) { list_for_each(tmp3, &ses->tcon_list) {
tcon = list_entry(tmp3, tcon = list_entry(tmp3,
struct cifsTconInfo, struct cifs_tcon,
tcon_list); tcon_list);
atomic_set(&tcon->num_smbs_sent, 0); atomic_set(&tcon->num_smbs_sent, 0);
atomic_set(&tcon->num_writes, 0); atomic_set(&tcon->num_writes, 0);
@ -312,8 +312,8 @@ static int cifs_stats_proc_show(struct seq_file *m, void *v)
int i; int i;
struct list_head *tmp1, *tmp2, *tmp3; struct list_head *tmp1, *tmp2, *tmp3;
struct TCP_Server_Info *server; struct TCP_Server_Info *server;
struct cifsSesInfo *ses; struct cifs_ses *ses;
struct cifsTconInfo *tcon; struct cifs_tcon *tcon;
seq_printf(m, seq_printf(m,
"Resources in use\nCIFS Session: %d\n", "Resources in use\nCIFS Session: %d\n",
@ -346,11 +346,11 @@ static int cifs_stats_proc_show(struct seq_file *m, void *v)
server = list_entry(tmp1, struct TCP_Server_Info, server = list_entry(tmp1, struct TCP_Server_Info,
tcp_ses_list); tcp_ses_list);
list_for_each(tmp2, &server->smb_ses_list) { list_for_each(tmp2, &server->smb_ses_list) {
ses = list_entry(tmp2, struct cifsSesInfo, ses = list_entry(tmp2, struct cifs_ses,
smb_ses_list); smb_ses_list);
list_for_each(tmp3, &ses->tcon_list) { list_for_each(tmp3, &ses->tcon_list) {
tcon = list_entry(tmp3, tcon = list_entry(tmp3,
struct cifsTconInfo, struct cifs_tcon,
tcon_list); tcon_list);
i++; i++;
seq_printf(m, "\n%d) %s", i, tcon->treeName); seq_printf(m, "\n%d) %s", i, tcon->treeName);

View File

@ -272,7 +272,7 @@ static struct vfsmount *cifs_dfs_do_automount(struct dentry *mntpt)
struct dfs_info3_param *referrals = NULL; struct dfs_info3_param *referrals = NULL;
unsigned int num_referrals = 0; unsigned int num_referrals = 0;
struct cifs_sb_info *cifs_sb; struct cifs_sb_info *cifs_sb;
struct cifsSesInfo *ses; struct cifs_ses *ses;
char *full_path; char *full_path;
int xid, i; int xid, i;
int rc; int rc;

View File

@ -95,7 +95,7 @@ struct key_type cifs_spnego_key_type = {
/* get a key struct with a SPNEGO security blob, suitable for session setup */ /* get a key struct with a SPNEGO security blob, suitable for session setup */
struct key * struct key *
cifs_get_spnego_key(struct cifsSesInfo *sesInfo) cifs_get_spnego_key(struct cifs_ses *sesInfo)
{ {
struct TCP_Server_Info *server = sesInfo->server; struct TCP_Server_Info *server = sesInfo->server;
struct sockaddr_in *sa = (struct sockaddr_in *) &server->dstaddr; struct sockaddr_in *sa = (struct sockaddr_in *) &server->dstaddr;

View File

@ -41,7 +41,7 @@ struct cifs_spnego_msg {
#ifdef __KERNEL__ #ifdef __KERNEL__
extern struct key_type cifs_spnego_key_type; extern struct key_type cifs_spnego_key_type;
extern struct key *cifs_get_spnego_key(struct cifsSesInfo *sesInfo); extern struct key *cifs_get_spnego_key(struct cifs_ses *sesInfo);
#endif /* KERNEL */ #endif /* KERNEL */
#endif /* _CIFS_SPNEGO_H */ #endif /* _CIFS_SPNEGO_H */

View File

@ -945,7 +945,7 @@ static struct cifs_ntsd *get_cifs_acl_by_path(struct cifs_sb_info *cifs_sb,
int oplock = 0; int oplock = 0;
int xid, rc; int xid, rc;
__u16 fid; __u16 fid;
struct cifsTconInfo *tcon; struct cifs_tcon *tcon;
struct tcon_link *tlink = cifs_sb_tlink(cifs_sb); struct tcon_link *tlink = cifs_sb_tlink(cifs_sb);
if (IS_ERR(tlink)) if (IS_ERR(tlink))
@ -1013,7 +1013,7 @@ static int set_cifs_acl_by_path(struct cifs_sb_info *cifs_sb, const char *path,
int oplock = 0; int oplock = 0;
int xid, rc; int xid, rc;
__u16 fid; __u16 fid;
struct cifsTconInfo *tcon; struct cifs_tcon *tcon;
struct tcon_link *tlink = cifs_sb_tlink(cifs_sb); struct tcon_link *tlink = cifs_sb_tlink(cifs_sb);
if (IS_ERR(tlink)) if (IS_ERR(tlink))

View File

@ -229,7 +229,7 @@ int cifs_verify_signature(struct smb_hdr *cifs_pdu,
} }
/* first calculate 24 bytes ntlm response and then 16 byte session key */ /* first calculate 24 bytes ntlm response and then 16 byte session key */
int setup_ntlm_response(struct cifsSesInfo *ses) int setup_ntlm_response(struct cifs_ses *ses)
{ {
int rc = 0; int rc = 0;
unsigned int temp_len = CIFS_SESS_KEY_SIZE + CIFS_AUTH_RESP_SIZE; unsigned int temp_len = CIFS_SESS_KEY_SIZE + CIFS_AUTH_RESP_SIZE;
@ -312,7 +312,7 @@ int calc_lanman_hash(const char *password, const char *cryptkey, bool encrypt,
* Allocate domain name which gets freed when session struct is deallocated. * Allocate domain name which gets freed when session struct is deallocated.
*/ */
static int static int
build_avpair_blob(struct cifsSesInfo *ses, const struct nls_table *nls_cp) build_avpair_blob(struct cifs_ses *ses, const struct nls_table *nls_cp)
{ {
unsigned int dlen; unsigned int dlen;
unsigned int wlen; unsigned int wlen;
@ -400,7 +400,7 @@ build_avpair_blob(struct cifsSesInfo *ses, const struct nls_table *nls_cp)
* about target string i.e. for some, just user name might suffice. * about target string i.e. for some, just user name might suffice.
*/ */
static int static int
find_domain_name(struct cifsSesInfo *ses, const struct nls_table *nls_cp) find_domain_name(struct cifs_ses *ses, const struct nls_table *nls_cp)
{ {
unsigned int attrsize; unsigned int attrsize;
unsigned int type; unsigned int type;
@ -445,7 +445,7 @@ find_domain_name(struct cifsSesInfo *ses, const struct nls_table *nls_cp)
return 0; return 0;
} }
static int calc_ntlmv2_hash(struct cifsSesInfo *ses, char *ntlmv2_hash, static int calc_ntlmv2_hash(struct cifs_ses *ses, char *ntlmv2_hash,
const struct nls_table *nls_cp) const struct nls_table *nls_cp)
{ {
int rc = 0; int rc = 0;
@ -527,7 +527,7 @@ calc_exit_2:
} }
static int static int
CalcNTLMv2_response(const struct cifsSesInfo *ses, char *ntlmv2_hash) CalcNTLMv2_response(const struct cifs_ses *ses, char *ntlmv2_hash)
{ {
int rc; int rc;
unsigned int offset = CIFS_SESS_KEY_SIZE + 8; unsigned int offset = CIFS_SESS_KEY_SIZE + 8;
@ -563,7 +563,7 @@ CalcNTLMv2_response(const struct cifsSesInfo *ses, char *ntlmv2_hash)
int int
setup_ntlmv2_rsp(struct cifsSesInfo *ses, const struct nls_table *nls_cp) setup_ntlmv2_rsp(struct cifs_ses *ses, const struct nls_table *nls_cp)
{ {
int rc; int rc;
int baselen; int baselen;
@ -649,7 +649,7 @@ setup_ntlmv2_rsp_ret:
} }
int int
calc_seckey(struct cifsSesInfo *ses) calc_seckey(struct cifs_ses *ses)
{ {
int rc; int rc;
struct crypto_blkcipher *tfm_arc4; struct crypto_blkcipher *tfm_arc4;

View File

@ -208,7 +208,7 @@ cifs_statfs(struct dentry *dentry, struct kstatfs *buf)
{ {
struct super_block *sb = dentry->d_sb; struct super_block *sb = dentry->d_sb;
struct cifs_sb_info *cifs_sb = CIFS_SB(sb); struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
struct cifsTconInfo *tcon = cifs_sb_master_tcon(cifs_sb); struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb);
int rc = -EOPNOTSUPP; int rc = -EOPNOTSUPP;
int xid; int xid;
@ -361,7 +361,7 @@ static int
cifs_show_options(struct seq_file *s, struct vfsmount *m) cifs_show_options(struct seq_file *s, struct vfsmount *m)
{ {
struct cifs_sb_info *cifs_sb = CIFS_SB(m->mnt_sb); struct cifs_sb_info *cifs_sb = CIFS_SB(m->mnt_sb);
struct cifsTconInfo *tcon = cifs_sb_master_tcon(cifs_sb); struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb);
struct sockaddr *srcaddr; struct sockaddr *srcaddr;
srcaddr = (struct sockaddr *)&tcon->ses->server->srcaddr; srcaddr = (struct sockaddr *)&tcon->ses->server->srcaddr;
@ -461,7 +461,7 @@ cifs_show_options(struct seq_file *s, struct vfsmount *m)
static void cifs_umount_begin(struct super_block *sb) static void cifs_umount_begin(struct super_block *sb)
{ {
struct cifs_sb_info *cifs_sb = CIFS_SB(sb); struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
struct cifsTconInfo *tcon; struct cifs_tcon *tcon;
if (cifs_sb == NULL) if (cifs_sb == NULL)
return; return;

View File

@ -254,7 +254,7 @@ struct TCP_Server_Info {
struct mutex srv_mutex; struct mutex srv_mutex;
struct task_struct *tsk; struct task_struct *tsk;
char server_GUID[16]; char server_GUID[16];
char secMode; char sec_mode;
bool session_estab; /* mark when very first sess is established */ bool session_estab; /* mark when very first sess is established */
u16 dialect; /* dialect index that server chose */ u16 dialect; /* dialect index that server chose */
enum securityEnum secType; enum securityEnum secType;
@ -329,7 +329,7 @@ static inline void cifs_set_net_ns(struct TCP_Server_Info *srv, struct net *net)
/* /*
* Session structure. One of these for each uid session with a particular host * Session structure. One of these for each uid session with a particular host
*/ */
struct cifsSesInfo { struct cifs_ses {
struct list_head smb_ses_list; struct list_head smb_ses_list;
struct list_head tcon_list; struct list_head tcon_list;
struct mutex session_mutex; struct mutex session_mutex;
@ -369,11 +369,11 @@ struct cifsSesInfo {
* there is one of these for each connection to a resource on a particular * there is one of these for each connection to a resource on a particular
* session * session
*/ */
struct cifsTconInfo { struct cifs_tcon {
struct list_head tcon_list; struct list_head tcon_list;
int tc_count; int tc_count;
struct list_head openFileList; struct list_head openFileList;
struct cifsSesInfo *ses; /* pointer to session associated with */ struct cifs_ses *ses; /* pointer to session associated with */
char treeName[MAX_TREE_SIZE + 1]; /* UNC name of resource in ASCII */ char treeName[MAX_TREE_SIZE + 1]; /* UNC name of resource in ASCII */
char *nativeFileSystem; char *nativeFileSystem;
char *password; /* for share-level security */ char *password; /* for share-level security */
@ -455,12 +455,12 @@ struct tcon_link {
#define TCON_LINK_IN_TREE 2 #define TCON_LINK_IN_TREE 2
unsigned long tl_time; unsigned long tl_time;
atomic_t tl_count; atomic_t tl_count;
struct cifsTconInfo *tl_tcon; struct cifs_tcon *tl_tcon;
}; };
extern struct tcon_link *cifs_sb_tlink(struct cifs_sb_info *cifs_sb); extern struct tcon_link *cifs_sb_tlink(struct cifs_sb_info *cifs_sb);
static inline struct cifsTconInfo * static inline struct cifs_tcon *
tlink_tcon(struct tcon_link *tlink) tlink_tcon(struct tcon_link *tlink)
{ {
return tlink->tl_tcon; return tlink->tl_tcon;
@ -477,7 +477,7 @@ cifs_get_tlink(struct tcon_link *tlink)
} }
/* This function is always expected to succeed */ /* This function is always expected to succeed */
extern struct cifsTconInfo *cifs_sb_master_tcon(struct cifs_sb_info *cifs_sb); extern struct cifs_tcon *cifs_sb_master_tcon(struct cifs_sb_info *cifs_sb);
/* /*
* This info hangs off the cifsFileInfo structure, pointed to by llist. * This info hangs off the cifsFileInfo structure, pointed to by llist.
@ -535,7 +535,7 @@ struct cifs_io_parms {
__u32 pid; __u32 pid;
__u64 offset; __u64 offset;
unsigned int length; unsigned int length;
struct cifsTconInfo *tcon; struct cifs_tcon *tcon;
}; };
/* /*
@ -615,7 +615,7 @@ convert_delimiter(char *path, char delim)
#ifdef CONFIG_CIFS_STATS #ifdef CONFIG_CIFS_STATS
#define cifs_stats_inc atomic_inc #define cifs_stats_inc atomic_inc
static inline void cifs_stats_bytes_written(struct cifsTconInfo *tcon, static inline void cifs_stats_bytes_written(struct cifs_tcon *tcon,
unsigned int bytes) unsigned int bytes)
{ {
if (bytes) { if (bytes) {
@ -625,7 +625,7 @@ static inline void cifs_stats_bytes_written(struct cifsTconInfo *tcon,
} }
} }
static inline void cifs_stats_bytes_read(struct cifsTconInfo *tcon, static inline void cifs_stats_bytes_read(struct cifs_tcon *tcon,
unsigned int bytes) unsigned int bytes)
{ {
spin_lock(&tcon->stat_lock); spin_lock(&tcon->stat_lock);
@ -675,7 +675,7 @@ struct mid_q_entry {
struct oplock_q_entry { struct oplock_q_entry {
struct list_head qhead; struct list_head qhead;
struct inode *pinode; struct inode *pinode;
struct cifsTconInfo *tcon; struct cifs_tcon *tcon;
__u16 netfid; __u16 netfid;
}; };

View File

@ -59,7 +59,7 @@ extern void cifs_destroy_idmaptrees(void);
extern char *build_path_from_dentry(struct dentry *); extern char *build_path_from_dentry(struct dentry *);
extern char *cifs_build_path_to_root(struct smb_vol *vol, extern char *cifs_build_path_to_root(struct smb_vol *vol,
struct cifs_sb_info *cifs_sb, struct cifs_sb_info *cifs_sb,
struct cifsTconInfo *tcon); struct cifs_tcon *tcon);
extern char *build_wildcard_path_from_dentry(struct dentry *direntry); extern char *build_wildcard_path_from_dentry(struct dentry *direntry);
extern char *cifs_compose_mount_options(const char *sb_mountdata, extern char *cifs_compose_mount_options(const char *sb_mountdata,
const char *fullpath, const struct dfs_info3_param *ref, const char *fullpath, const struct dfs_info3_param *ref,
@ -71,19 +71,19 @@ extern void DeleteMidQEntry(struct mid_q_entry *midEntry);
extern int cifs_call_async(struct TCP_Server_Info *server, struct kvec *iov, extern int cifs_call_async(struct TCP_Server_Info *server, struct kvec *iov,
unsigned int nvec, mid_callback_t *callback, unsigned int nvec, mid_callback_t *callback,
void *cbdata, bool ignore_pend); void *cbdata, bool ignore_pend);
extern int SendReceive(const unsigned int /* xid */ , struct cifsSesInfo *, extern int SendReceive(const unsigned int /* xid */ , struct cifs_ses *,
struct smb_hdr * /* input */ , struct smb_hdr * /* input */ ,
struct smb_hdr * /* out */ , struct smb_hdr * /* out */ ,
int * /* bytes returned */ , const int long_op); int * /* bytes returned */ , const int long_op);
extern int SendReceiveNoRsp(const unsigned int xid, struct cifsSesInfo *ses, extern int SendReceiveNoRsp(const unsigned int xid, struct cifs_ses *ses,
struct smb_hdr *in_buf, int flags); struct smb_hdr *in_buf, int flags);
extern int cifs_check_receive(struct mid_q_entry *mid, extern int cifs_check_receive(struct mid_q_entry *mid,
struct TCP_Server_Info *server, bool log_error); struct TCP_Server_Info *server, bool log_error);
extern int SendReceive2(const unsigned int /* xid */ , struct cifsSesInfo *, extern int SendReceive2(const unsigned int /* xid */ , struct cifs_ses *,
struct kvec *, int /* nvec to send */, struct kvec *, int /* nvec to send */,
int * /* type of buf returned */ , const int flags); int * /* type of buf returned */ , const int flags);
extern int SendReceiveBlockingLock(const unsigned int xid, extern int SendReceiveBlockingLock(const unsigned int xid,
struct cifsTconInfo *ptcon, struct cifs_tcon *ptcon,
struct smb_hdr *in_buf , struct smb_hdr *in_buf ,
struct smb_hdr *out_buf, struct smb_hdr *out_buf,
int *bytes_returned); int *bytes_returned);
@ -104,12 +104,12 @@ extern int cifs_fill_sockaddr(struct sockaddr *dst, const char *src, int len,
const unsigned short int port); const unsigned short int port);
extern int map_smb_to_linux_error(struct smb_hdr *smb, bool logErr); extern int map_smb_to_linux_error(struct smb_hdr *smb, bool logErr);
extern void header_assemble(struct smb_hdr *, char /* command */ , extern void header_assemble(struct smb_hdr *, char /* command */ ,
const struct cifsTconInfo *, int /* length of const struct cifs_tcon *, int /* length of
fixed section (word count) in two byte units */); fixed section (word count) in two byte units */);
extern int small_smb_init_no_tc(const int smb_cmd, const int wct, extern int small_smb_init_no_tc(const int smb_cmd, const int wct,
struct cifsSesInfo *ses, struct cifs_ses *ses,
void **request_buf); void **request_buf);
extern int CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, extern int CIFS_SessSetup(unsigned int xid, struct cifs_ses *ses,
const struct nls_table *nls_cp); const struct nls_table *nls_cp);
extern __u16 GetNextMid(struct TCP_Server_Info *server); extern __u16 GetNextMid(struct TCP_Server_Info *server);
extern struct timespec cifs_NTtimeToUnix(__le64 utc_nanoseconds_since_1601); extern struct timespec cifs_NTtimeToUnix(__le64 utc_nanoseconds_since_1601);
@ -165,94 +165,94 @@ void cifs_proc_init(void);
void cifs_proc_clean(void); void cifs_proc_clean(void);
extern int cifs_negotiate_protocol(unsigned int xid, extern int cifs_negotiate_protocol(unsigned int xid,
struct cifsSesInfo *ses); struct cifs_ses *ses);
extern int cifs_setup_session(unsigned int xid, struct cifsSesInfo *ses, extern int cifs_setup_session(unsigned int xid, struct cifs_ses *ses,
struct nls_table *nls_info); struct nls_table *nls_info);
extern int CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses); extern int CIFSSMBNegotiate(unsigned int xid, struct cifs_ses *ses);
extern int CIFSTCon(unsigned int xid, struct cifsSesInfo *ses, extern int CIFSTCon(unsigned int xid, struct cifs_ses *ses,
const char *tree, struct cifsTconInfo *tcon, const char *tree, struct cifs_tcon *tcon,
const struct nls_table *); const struct nls_table *);
extern int CIFSFindFirst(const int xid, struct cifsTconInfo *tcon, extern int CIFSFindFirst(const int xid, struct cifs_tcon *tcon,
const char *searchName, const struct nls_table *nls_codepage, const char *searchName, const struct nls_table *nls_codepage,
__u16 *searchHandle, struct cifs_search_info *psrch_inf, __u16 *searchHandle, struct cifs_search_info *psrch_inf,
int map, const char dirsep); int map, const char dirsep);
extern int CIFSFindNext(const int xid, struct cifsTconInfo *tcon, extern int CIFSFindNext(const int xid, struct cifs_tcon *tcon,
__u16 searchHandle, struct cifs_search_info *psrch_inf); __u16 searchHandle, struct cifs_search_info *psrch_inf);
extern int CIFSFindClose(const int, struct cifsTconInfo *tcon, extern int CIFSFindClose(const int, struct cifs_tcon *tcon,
const __u16 search_handle); const __u16 search_handle);
extern int CIFSSMBQFileInfo(const int xid, struct cifsTconInfo *tcon, extern int CIFSSMBQFileInfo(const int xid, struct cifs_tcon *tcon,
u16 netfid, FILE_ALL_INFO *pFindData); u16 netfid, FILE_ALL_INFO *pFindData);
extern int CIFSSMBQPathInfo(const int xid, struct cifsTconInfo *tcon, extern int CIFSSMBQPathInfo(const int xid, struct cifs_tcon *tcon,
const unsigned char *searchName, const unsigned char *searchName,
FILE_ALL_INFO *findData, FILE_ALL_INFO *findData,
int legacy /* whether to use old info level */, int legacy /* whether to use old info level */,
const struct nls_table *nls_codepage, int remap); const struct nls_table *nls_codepage, int remap);
extern int SMBQueryInformation(const int xid, struct cifsTconInfo *tcon, extern int SMBQueryInformation(const int xid, struct cifs_tcon *tcon,
const unsigned char *searchName, const unsigned char *searchName,
FILE_ALL_INFO *findData, FILE_ALL_INFO *findData,
const struct nls_table *nls_codepage, int remap); const struct nls_table *nls_codepage, int remap);
extern int CIFSSMBUnixQFileInfo(const int xid, struct cifsTconInfo *tcon, extern int CIFSSMBUnixQFileInfo(const int xid, struct cifs_tcon *tcon,
u16 netfid, FILE_UNIX_BASIC_INFO *pFindData); u16 netfid, FILE_UNIX_BASIC_INFO *pFindData);
extern int CIFSSMBUnixQPathInfo(const int xid, extern int CIFSSMBUnixQPathInfo(const int xid,
struct cifsTconInfo *tcon, struct cifs_tcon *tcon,
const unsigned char *searchName, const unsigned char *searchName,
FILE_UNIX_BASIC_INFO *pFindData, FILE_UNIX_BASIC_INFO *pFindData,
const struct nls_table *nls_codepage, int remap); const struct nls_table *nls_codepage, int remap);
extern int CIFSGetDFSRefer(const int xid, struct cifsSesInfo *ses, extern int CIFSGetDFSRefer(const int xid, struct cifs_ses *ses,
const unsigned char *searchName, const unsigned char *searchName,
struct dfs_info3_param **target_nodes, struct dfs_info3_param **target_nodes,
unsigned int *number_of_nodes_in_array, unsigned int *number_of_nodes_in_array,
const struct nls_table *nls_codepage, int remap); const struct nls_table *nls_codepage, int remap);
extern int get_dfs_path(int xid, struct cifsSesInfo *pSesInfo, extern int get_dfs_path(int xid, struct cifs_ses *pSesInfo,
const char *old_path, const char *old_path,
const struct nls_table *nls_codepage, const struct nls_table *nls_codepage,
unsigned int *pnum_referrals, unsigned int *pnum_referrals,
struct dfs_info3_param **preferrals, struct dfs_info3_param **preferrals,
int remap); int remap);
extern void reset_cifs_unix_caps(int xid, struct cifsTconInfo *tcon, extern void reset_cifs_unix_caps(int xid, struct cifs_tcon *tcon,
struct super_block *sb, struct smb_vol *vol); struct super_block *sb, struct smb_vol *vol);
extern int CIFSSMBQFSInfo(const int xid, struct cifsTconInfo *tcon, extern int CIFSSMBQFSInfo(const int xid, struct cifs_tcon *tcon,
struct kstatfs *FSData); struct kstatfs *FSData);
extern int SMBOldQFSInfo(const int xid, struct cifsTconInfo *tcon, extern int SMBOldQFSInfo(const int xid, struct cifs_tcon *tcon,
struct kstatfs *FSData); struct kstatfs *FSData);
extern int CIFSSMBSetFSUnixInfo(const int xid, struct cifsTconInfo *tcon, extern int CIFSSMBSetFSUnixInfo(const int xid, struct cifs_tcon *tcon,
__u64 cap); __u64 cap);
extern int CIFSSMBQFSAttributeInfo(const int xid, extern int CIFSSMBQFSAttributeInfo(const int xid,
struct cifsTconInfo *tcon); struct cifs_tcon *tcon);
extern int CIFSSMBQFSDeviceInfo(const int xid, struct cifsTconInfo *tcon); extern int CIFSSMBQFSDeviceInfo(const int xid, struct cifs_tcon *tcon);
extern int CIFSSMBQFSUnixInfo(const int xid, struct cifsTconInfo *tcon); extern int CIFSSMBQFSUnixInfo(const int xid, struct cifs_tcon *tcon);
extern int CIFSSMBQFSPosixInfo(const int xid, struct cifsTconInfo *tcon, extern int CIFSSMBQFSPosixInfo(const int xid, struct cifs_tcon *tcon,
struct kstatfs *FSData); struct kstatfs *FSData);
extern int CIFSSMBSetPathInfo(const int xid, struct cifsTconInfo *tcon, extern int CIFSSMBSetPathInfo(const int xid, struct cifs_tcon *tcon,
const char *fileName, const FILE_BASIC_INFO *data, const char *fileName, const FILE_BASIC_INFO *data,
const struct nls_table *nls_codepage, const struct nls_table *nls_codepage,
int remap_special_chars); int remap_special_chars);
extern int CIFSSMBSetFileInfo(const int xid, struct cifsTconInfo *tcon, extern int CIFSSMBSetFileInfo(const int xid, struct cifs_tcon *tcon,
const FILE_BASIC_INFO *data, __u16 fid, const FILE_BASIC_INFO *data, __u16 fid,
__u32 pid_of_opener); __u32 pid_of_opener);
extern int CIFSSMBSetFileDisposition(const int xid, struct cifsTconInfo *tcon, extern int CIFSSMBSetFileDisposition(const int xid, struct cifs_tcon *tcon,
bool delete_file, __u16 fid, __u32 pid_of_opener); bool delete_file, __u16 fid, __u32 pid_of_opener);
#if 0 #if 0
extern int CIFSSMBSetAttrLegacy(int xid, struct cifsTconInfo *tcon, extern int CIFSSMBSetAttrLegacy(int xid, struct cifs_tcon *tcon,
char *fileName, __u16 dos_attributes, char *fileName, __u16 dos_attributes,
const struct nls_table *nls_codepage); const struct nls_table *nls_codepage);
#endif /* possibly unneeded function */ #endif /* possibly unneeded function */
extern int CIFSSMBSetEOF(const int xid, struct cifsTconInfo *tcon, extern int CIFSSMBSetEOF(const int xid, struct cifs_tcon *tcon,
const char *fileName, __u64 size, const char *fileName, __u64 size,
bool setAllocationSizeFlag, bool setAllocationSizeFlag,
const struct nls_table *nls_codepage, const struct nls_table *nls_codepage,
int remap_special_chars); int remap_special_chars);
extern int CIFSSMBSetFileSize(const int xid, struct cifsTconInfo *tcon, extern int CIFSSMBSetFileSize(const int xid, struct cifs_tcon *tcon,
__u64 size, __u16 fileHandle, __u32 opener_pid, __u64 size, __u16 fileHandle, __u32 opener_pid,
bool AllocSizeFlag); bool AllocSizeFlag);
@ -266,83 +266,83 @@ struct cifs_unix_set_info_args {
dev_t device; dev_t device;
}; };
extern int CIFSSMBUnixSetFileInfo(const int xid, struct cifsTconInfo *tcon, extern int CIFSSMBUnixSetFileInfo(const int xid, struct cifs_tcon *tcon,
const struct cifs_unix_set_info_args *args, const struct cifs_unix_set_info_args *args,
u16 fid, u32 pid_of_opener); u16 fid, u32 pid_of_opener);
extern int CIFSSMBUnixSetPathInfo(const int xid, struct cifsTconInfo *pTcon, extern int CIFSSMBUnixSetPathInfo(const int xid, struct cifs_tcon *pTcon,
char *fileName, char *fileName,
const struct cifs_unix_set_info_args *args, const struct cifs_unix_set_info_args *args,
const struct nls_table *nls_codepage, const struct nls_table *nls_codepage,
int remap_special_chars); int remap_special_chars);
extern int CIFSSMBMkDir(const int xid, struct cifsTconInfo *tcon, extern int CIFSSMBMkDir(const int xid, struct cifs_tcon *tcon,
const char *newName, const char *newName,
const struct nls_table *nls_codepage, const struct nls_table *nls_codepage,
int remap_special_chars); int remap_special_chars);
extern int CIFSSMBRmDir(const int xid, struct cifsTconInfo *tcon, extern int CIFSSMBRmDir(const int xid, struct cifs_tcon *tcon,
const char *name, const struct nls_table *nls_codepage, const char *name, const struct nls_table *nls_codepage,
int remap_special_chars); int remap_special_chars);
extern int CIFSPOSIXDelFile(const int xid, struct cifsTconInfo *tcon, extern int CIFSPOSIXDelFile(const int xid, struct cifs_tcon *tcon,
const char *name, __u16 type, const char *name, __u16 type,
const struct nls_table *nls_codepage, const struct nls_table *nls_codepage,
int remap_special_chars); int remap_special_chars);
extern int CIFSSMBDelFile(const int xid, struct cifsTconInfo *tcon, extern int CIFSSMBDelFile(const int xid, struct cifs_tcon *tcon,
const char *name, const char *name,
const struct nls_table *nls_codepage, const struct nls_table *nls_codepage,
int remap_special_chars); int remap_special_chars);
extern int CIFSSMBRename(const int xid, struct cifsTconInfo *tcon, extern int CIFSSMBRename(const int xid, struct cifs_tcon *tcon,
const char *fromName, const char *toName, const char *fromName, const char *toName,
const struct nls_table *nls_codepage, const struct nls_table *nls_codepage,
int remap_special_chars); int remap_special_chars);
extern int CIFSSMBRenameOpenFile(const int xid, struct cifsTconInfo *pTcon, extern int CIFSSMBRenameOpenFile(const int xid, struct cifs_tcon *pTcon,
int netfid, const char *target_name, int netfid, const char *target_name,
const struct nls_table *nls_codepage, const struct nls_table *nls_codepage,
int remap_special_chars); int remap_special_chars);
extern int CIFSCreateHardLink(const int xid, extern int CIFSCreateHardLink(const int xid,
struct cifsTconInfo *tcon, struct cifs_tcon *tcon,
const char *fromName, const char *toName, const char *fromName, const char *toName,
const struct nls_table *nls_codepage, const struct nls_table *nls_codepage,
int remap_special_chars); int remap_special_chars);
extern int CIFSUnixCreateHardLink(const int xid, extern int CIFSUnixCreateHardLink(const int xid,
struct cifsTconInfo *tcon, struct cifs_tcon *tcon,
const char *fromName, const char *toName, const char *fromName, const char *toName,
const struct nls_table *nls_codepage, const struct nls_table *nls_codepage,
int remap_special_chars); int remap_special_chars);
extern int CIFSUnixCreateSymLink(const int xid, extern int CIFSUnixCreateSymLink(const int xid,
struct cifsTconInfo *tcon, struct cifs_tcon *tcon,
const char *fromName, const char *toName, const char *fromName, const char *toName,
const struct nls_table *nls_codepage); const struct nls_table *nls_codepage);
extern int CIFSSMBUnixQuerySymLink(const int xid, extern int CIFSSMBUnixQuerySymLink(const int xid,
struct cifsTconInfo *tcon, struct cifs_tcon *tcon,
const unsigned char *searchName, char **syminfo, const unsigned char *searchName, char **syminfo,
const struct nls_table *nls_codepage); const struct nls_table *nls_codepage);
#ifdef CONFIG_CIFS_SYMLINK_EXPERIMENTAL #ifdef CONFIG_CIFS_SYMLINK_EXPERIMENTAL
extern int CIFSSMBQueryReparseLinkInfo(const int xid, extern int CIFSSMBQueryReparseLinkInfo(const int xid,
struct cifsTconInfo *tcon, struct cifs_tcon *tcon,
const unsigned char *searchName, const unsigned char *searchName,
char *symlinkinfo, const int buflen, __u16 fid, char *symlinkinfo, const int buflen, __u16 fid,
const struct nls_table *nls_codepage); const struct nls_table *nls_codepage);
#endif /* temporarily unused until cifs_symlink fixed */ #endif /* temporarily unused until cifs_symlink fixed */
extern int CIFSSMBOpen(const int xid, struct cifsTconInfo *tcon, extern int CIFSSMBOpen(const int xid, struct cifs_tcon *tcon,
const char *fileName, const int disposition, const char *fileName, const int disposition,
const int access_flags, const int omode, const int access_flags, const int omode,
__u16 *netfid, int *pOplock, FILE_ALL_INFO *, __u16 *netfid, int *pOplock, FILE_ALL_INFO *,
const struct nls_table *nls_codepage, int remap); const struct nls_table *nls_codepage, int remap);
extern int SMBLegacyOpen(const int xid, struct cifsTconInfo *tcon, extern int SMBLegacyOpen(const int xid, struct cifs_tcon *tcon,
const char *fileName, const int disposition, const char *fileName, const int disposition,
const int access_flags, const int omode, const int access_flags, const int omode,
__u16 *netfid, int *pOplock, FILE_ALL_INFO *, __u16 *netfid, int *pOplock, FILE_ALL_INFO *,
const struct nls_table *nls_codepage, int remap); const struct nls_table *nls_codepage, int remap);
extern int CIFSPOSIXCreate(const int xid, struct cifsTconInfo *tcon, extern int CIFSPOSIXCreate(const int xid, struct cifs_tcon *tcon,
u32 posix_flags, __u64 mode, __u16 *netfid, u32 posix_flags, __u64 mode, __u16 *netfid,
FILE_UNIX_BASIC_INFO *pRetData, FILE_UNIX_BASIC_INFO *pRetData,
__u32 *pOplock, const char *name, __u32 *pOplock, const char *name,
const struct nls_table *nls_codepage, int remap); const struct nls_table *nls_codepage, int remap);
extern int CIFSSMBClose(const int xid, struct cifsTconInfo *tcon, extern int CIFSSMBClose(const int xid, struct cifs_tcon *tcon,
const int smb_file_id); const int smb_file_id);
extern int CIFSSMBFlush(const int xid, struct cifsTconInfo *tcon, extern int CIFSSMBFlush(const int xid, struct cifs_tcon *tcon,
const int smb_file_id); const int smb_file_id);
extern int CIFSSMBRead(const int xid, struct cifs_io_parms *io_parms, extern int CIFSSMBRead(const int xid, struct cifs_io_parms *io_parms,
@ -354,28 +354,28 @@ extern int CIFSSMBWrite(const int xid, struct cifs_io_parms *io_parms,
extern int CIFSSMBWrite2(const int xid, struct cifs_io_parms *io_parms, extern int CIFSSMBWrite2(const int xid, struct cifs_io_parms *io_parms,
unsigned int *nbytes, struct kvec *iov, const int nvec, unsigned int *nbytes, struct kvec *iov, const int nvec,
const int long_op); const int long_op);
extern int CIFSGetSrvInodeNumber(const int xid, struct cifsTconInfo *tcon, extern int CIFSGetSrvInodeNumber(const int xid, struct cifs_tcon *tcon,
const unsigned char *searchName, __u64 *inode_number, const unsigned char *searchName, __u64 *inode_number,
const struct nls_table *nls_codepage, const struct nls_table *nls_codepage,
int remap_special_chars); int remap_special_chars);
extern int CIFSSMBLock(const int xid, struct cifsTconInfo *tcon, extern int CIFSSMBLock(const int xid, struct cifs_tcon *tcon,
const __u16 netfid, const __u64 len, const __u16 netfid, const __u64 len,
const __u64 offset, const __u32 numUnlock, const __u64 offset, const __u32 numUnlock,
const __u32 numLock, const __u8 lockType, const __u32 numLock, const __u8 lockType,
const bool waitFlag, const __u8 oplock_level); const bool waitFlag, const __u8 oplock_level);
extern int CIFSSMBPosixLock(const int xid, struct cifsTconInfo *tcon, extern int CIFSSMBPosixLock(const int xid, struct cifs_tcon *tcon,
const __u16 smb_file_id, const int get_flag, const __u16 smb_file_id, const int get_flag,
const __u64 len, struct file_lock *, const __u64 len, struct file_lock *,
const __u16 lock_type, const bool waitFlag); const __u16 lock_type, const bool waitFlag);
extern int CIFSSMBTDis(const int xid, struct cifsTconInfo *tcon); extern int CIFSSMBTDis(const int xid, struct cifs_tcon *tcon);
extern int CIFSSMBEcho(struct TCP_Server_Info *server); extern int CIFSSMBEcho(struct TCP_Server_Info *server);
extern int CIFSSMBLogoff(const int xid, struct cifsSesInfo *ses); extern int CIFSSMBLogoff(const int xid, struct cifs_ses *ses);
extern struct cifsSesInfo *sesInfoAlloc(void); extern struct cifs_ses *sesInfoAlloc(void);
extern void sesInfoFree(struct cifsSesInfo *); extern void sesInfoFree(struct cifs_ses *);
extern struct cifsTconInfo *tconInfoAlloc(void); extern struct cifs_tcon *tconInfoAlloc(void);
extern void tconInfoFree(struct cifsTconInfo *); extern void tconInfoFree(struct cifs_tcon *);
extern int cifs_sign_smb(struct smb_hdr *, struct TCP_Server_Info *, __u32 *); extern int cifs_sign_smb(struct smb_hdr *, struct TCP_Server_Info *, __u32 *);
extern int cifs_sign_smb2(struct kvec *iov, int n_vec, struct TCP_Server_Info *, extern int cifs_sign_smb2(struct kvec *iov, int n_vec, struct TCP_Server_Info *,
@ -384,51 +384,51 @@ extern int cifs_verify_signature(struct smb_hdr *,
struct TCP_Server_Info *server, struct TCP_Server_Info *server,
__u32 expected_sequence_number); __u32 expected_sequence_number);
extern int SMBNTencrypt(unsigned char *, unsigned char *, unsigned char *); extern int SMBNTencrypt(unsigned char *, unsigned char *, unsigned char *);
extern int setup_ntlm_response(struct cifsSesInfo *); extern int setup_ntlm_response(struct cifs_ses *);
extern int setup_ntlmv2_rsp(struct cifsSesInfo *, const struct nls_table *); extern int setup_ntlmv2_rsp(struct cifs_ses *, const struct nls_table *);
extern int cifs_crypto_shash_allocate(struct TCP_Server_Info *); extern int cifs_crypto_shash_allocate(struct TCP_Server_Info *);
extern void cifs_crypto_shash_release(struct TCP_Server_Info *); extern void cifs_crypto_shash_release(struct TCP_Server_Info *);
extern int calc_seckey(struct cifsSesInfo *); extern int calc_seckey(struct cifs_ses *);
#ifdef CONFIG_CIFS_WEAK_PW_HASH #ifdef CONFIG_CIFS_WEAK_PW_HASH
extern int calc_lanman_hash(const char *password, const char *cryptkey, extern int calc_lanman_hash(const char *password, const char *cryptkey,
bool encrypt, char *lnm_session_key); bool encrypt, char *lnm_session_key);
#endif /* CIFS_WEAK_PW_HASH */ #endif /* CIFS_WEAK_PW_HASH */
#ifdef CONFIG_CIFS_DNOTIFY_EXPERIMENTAL /* unused temporarily */ #ifdef CONFIG_CIFS_DNOTIFY_EXPERIMENTAL /* unused temporarily */
extern int CIFSSMBNotify(const int xid, struct cifsTconInfo *tcon, extern int CIFSSMBNotify(const int xid, struct cifs_tcon *tcon,
const int notify_subdirs, const __u16 netfid, const int notify_subdirs, const __u16 netfid,
__u32 filter, struct file *file, int multishot, __u32 filter, struct file *file, int multishot,
const struct nls_table *nls_codepage); const struct nls_table *nls_codepage);
#endif /* was needed for dnotify, and will be needed for inotify when VFS fix */ #endif /* was needed for dnotify, and will be needed for inotify when VFS fix */
extern int CIFSSMBCopy(int xid, extern int CIFSSMBCopy(int xid,
struct cifsTconInfo *source_tcon, struct cifs_tcon *source_tcon,
const char *fromName, const char *fromName,
const __u16 target_tid, const __u16 target_tid,
const char *toName, const int flags, const char *toName, const int flags,
const struct nls_table *nls_codepage, const struct nls_table *nls_codepage,
int remap_special_chars); int remap_special_chars);
extern ssize_t CIFSSMBQAllEAs(const int xid, struct cifsTconInfo *tcon, extern ssize_t CIFSSMBQAllEAs(const int xid, struct cifs_tcon *tcon,
const unsigned char *searchName, const unsigned char *searchName,
const unsigned char *ea_name, char *EAData, const unsigned char *ea_name, char *EAData,
size_t bufsize, const struct nls_table *nls_codepage, size_t bufsize, const struct nls_table *nls_codepage,
int remap_special_chars); int remap_special_chars);
extern int CIFSSMBSetEA(const int xid, struct cifsTconInfo *tcon, extern int CIFSSMBSetEA(const int xid, struct cifs_tcon *tcon,
const char *fileName, const char *ea_name, const char *fileName, const char *ea_name,
const void *ea_value, const __u16 ea_value_len, const void *ea_value, const __u16 ea_value_len,
const struct nls_table *nls_codepage, int remap_special_chars); const struct nls_table *nls_codepage, int remap_special_chars);
extern int CIFSSMBGetCIFSACL(const int xid, struct cifsTconInfo *tcon, extern int CIFSSMBGetCIFSACL(const int xid, struct cifs_tcon *tcon,
__u16 fid, struct cifs_ntsd **acl_inf, __u32 *buflen); __u16 fid, struct cifs_ntsd **acl_inf, __u32 *buflen);
extern int CIFSSMBSetCIFSACL(const int, struct cifsTconInfo *, __u16, extern int CIFSSMBSetCIFSACL(const int, struct cifs_tcon *, __u16,
struct cifs_ntsd *, __u32); struct cifs_ntsd *, __u32);
extern int CIFSSMBGetPosixACL(const int xid, struct cifsTconInfo *tcon, extern int CIFSSMBGetPosixACL(const int xid, struct cifs_tcon *tcon,
const unsigned char *searchName, const unsigned char *searchName,
char *acl_inf, const int buflen, const int acl_type, char *acl_inf, const int buflen, const int acl_type,
const struct nls_table *nls_codepage, int remap_special_chars); const struct nls_table *nls_codepage, int remap_special_chars);
extern int CIFSSMBSetPosixACL(const int xid, struct cifsTconInfo *tcon, extern int CIFSSMBSetPosixACL(const int xid, struct cifs_tcon *tcon,
const unsigned char *fileName, const unsigned char *fileName,
const char *local_acl, const int buflen, const int acl_type, const char *local_acl, const int buflen, const int acl_type,
const struct nls_table *nls_codepage, int remap_special_chars); const struct nls_table *nls_codepage, int remap_special_chars);
extern int CIFSGetExtAttr(const int xid, struct cifsTconInfo *tcon, extern int CIFSGetExtAttr(const int xid, struct cifs_tcon *tcon,
const int netfid, __u64 *pExtAttrBits, __u64 *pMask); const int netfid, __u64 *pExtAttrBits, __u64 *pMask);
extern void cifs_autodisable_serverino(struct cifs_sb_info *cifs_sb); extern void cifs_autodisable_serverino(struct cifs_sb_info *cifs_sb);
extern bool CIFSCouldBeMFSymlink(const struct cifs_fattr *fattr); extern bool CIFSCouldBeMFSymlink(const struct cifs_fattr *fattr);

View File

@ -85,7 +85,7 @@ static struct {
/* Mark as invalid, all open files on tree connections since they /* Mark as invalid, all open files on tree connections since they
were closed when session to server was lost */ were closed when session to server was lost */
static void mark_open_files_invalid(struct cifsTconInfo *pTcon) static void mark_open_files_invalid(struct cifs_tcon *pTcon)
{ {
struct cifsFileInfo *open_file = NULL; struct cifsFileInfo *open_file = NULL;
struct list_head *tmp; struct list_head *tmp;
@ -105,10 +105,10 @@ static void mark_open_files_invalid(struct cifsTconInfo *pTcon)
/* reconnect the socket, tcon, and smb session if needed */ /* reconnect the socket, tcon, and smb session if needed */
static int static int
cifs_reconnect_tcon(struct cifsTconInfo *tcon, int smb_command) cifs_reconnect_tcon(struct cifs_tcon *tcon, int smb_command)
{ {
int rc = 0; int rc = 0;
struct cifsSesInfo *ses; struct cifs_ses *ses;
struct TCP_Server_Info *server; struct TCP_Server_Info *server;
struct nls_table *nls_codepage; struct nls_table *nls_codepage;
@ -227,7 +227,7 @@ out:
SMB information in the SMB header. If the return code is zero, this SMB information in the SMB header. If the return code is zero, this
function must have filled in request_buf pointer */ function must have filled in request_buf pointer */
static int static int
small_smb_init(int smb_command, int wct, struct cifsTconInfo *tcon, small_smb_init(int smb_command, int wct, struct cifs_tcon *tcon,
void **request_buf) void **request_buf)
{ {
int rc; int rc;
@ -253,7 +253,7 @@ small_smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
int int
small_smb_init_no_tc(const int smb_command, const int wct, small_smb_init_no_tc(const int smb_command, const int wct,
struct cifsSesInfo *ses, void **request_buf) struct cifs_ses *ses, void **request_buf)
{ {
int rc; int rc;
struct smb_hdr *buffer; struct smb_hdr *buffer;
@ -279,7 +279,7 @@ small_smb_init_no_tc(const int smb_command, const int wct,
/* If the return code is zero, this function must fill in request_buf pointer */ /* If the return code is zero, this function must fill in request_buf pointer */
static int static int
__smb_init(int smb_command, int wct, struct cifsTconInfo *tcon, __smb_init(int smb_command, int wct, struct cifs_tcon *tcon,
void **request_buf, void **response_buf) void **request_buf, void **response_buf)
{ {
*request_buf = cifs_buf_get(); *request_buf = cifs_buf_get();
@ -305,7 +305,7 @@ __smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
/* If the return code is zero, this function must fill in request_buf pointer */ /* If the return code is zero, this function must fill in request_buf pointer */
static int static int
smb_init(int smb_command, int wct, struct cifsTconInfo *tcon, smb_init(int smb_command, int wct, struct cifs_tcon *tcon,
void **request_buf, void **response_buf) void **request_buf, void **response_buf)
{ {
int rc; int rc;
@ -318,7 +318,7 @@ smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
} }
static int static int
smb_init_no_reconnect(int smb_command, int wct, struct cifsTconInfo *tcon, smb_init_no_reconnect(int smb_command, int wct, struct cifs_tcon *tcon,
void **request_buf, void **response_buf) void **request_buf, void **response_buf)
{ {
if (tcon->ses->need_reconnect || tcon->need_reconnect) if (tcon->ses->need_reconnect || tcon->need_reconnect)
@ -367,7 +367,7 @@ static inline void inc_rfc1001_len(void *pSMB, int count)
} }
int int
CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses) CIFSSMBNegotiate(unsigned int xid, struct cifs_ses *ses)
{ {
NEGOTIATE_REQ *pSMB; NEGOTIATE_REQ *pSMB;
NEGOTIATE_RSP *pSMBr; NEGOTIATE_RSP *pSMBr;
@ -451,7 +451,7 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses)
rc = -EOPNOTSUPP; rc = -EOPNOTSUPP;
goto neg_err_exit; goto neg_err_exit;
} }
server->secMode = (__u8)le16_to_cpu(rsp->SecurityMode); server->sec_mode = (__u8)le16_to_cpu(rsp->SecurityMode);
server->maxReq = le16_to_cpu(rsp->MaxMpxCount); server->maxReq = le16_to_cpu(rsp->MaxMpxCount);
server->maxBuf = min((__u32)le16_to_cpu(rsp->MaxBufSize), server->maxBuf = min((__u32)le16_to_cpu(rsp->MaxBufSize),
(__u32)CIFSMaxBufSize + MAX_CIFS_HDR_SIZE); (__u32)CIFSMaxBufSize + MAX_CIFS_HDR_SIZE);
@ -505,7 +505,7 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses)
cpu_to_le16(CIFS_CRYPTO_KEY_SIZE)) { cpu_to_le16(CIFS_CRYPTO_KEY_SIZE)) {
memcpy(ses->server->cryptkey, rsp->EncryptionKey, memcpy(ses->server->cryptkey, rsp->EncryptionKey,
CIFS_CRYPTO_KEY_SIZE); CIFS_CRYPTO_KEY_SIZE);
} else if (server->secMode & SECMODE_PW_ENCRYPT) { } else if (server->sec_mode & SECMODE_PW_ENCRYPT) {
rc = -EIO; /* need cryptkey unless plain text */ rc = -EIO; /* need cryptkey unless plain text */
goto neg_err_exit; goto neg_err_exit;
} }
@ -527,11 +527,11 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses)
goto neg_err_exit; goto neg_err_exit;
} }
/* else wct == 17 NTLM */ /* else wct == 17 NTLM */
server->secMode = pSMBr->SecurityMode; server->sec_mode = pSMBr->SecurityMode;
if ((server->secMode & SECMODE_USER) == 0) if ((server->sec_mode & SECMODE_USER) == 0)
cFYI(1, "share mode security"); cFYI(1, "share mode security");
if ((server->secMode & SECMODE_PW_ENCRYPT) == 0) if ((server->sec_mode & SECMODE_PW_ENCRYPT) == 0)
#ifdef CONFIG_CIFS_WEAK_PW_HASH #ifdef CONFIG_CIFS_WEAK_PW_HASH
if ((secFlags & CIFSSEC_MAY_PLNTXT) == 0) if ((secFlags & CIFSSEC_MAY_PLNTXT) == 0)
#endif /* CIFS_WEAK_PW_HASH */ #endif /* CIFS_WEAK_PW_HASH */
@ -617,7 +617,7 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses)
} else } else
rc = -EOPNOTSUPP; rc = -EOPNOTSUPP;
} }
} else if (server->secMode & SECMODE_PW_ENCRYPT) { } else if (server->sec_mode & SECMODE_PW_ENCRYPT) {
rc = -EIO; /* no crypt key only if plain text pwd */ rc = -EIO; /* no crypt key only if plain text pwd */
goto neg_err_exit; goto neg_err_exit;
} else } else
@ -630,27 +630,27 @@ signing_check:
/* MUST_SIGN already includes the MAY_SIGN FLAG /* MUST_SIGN already includes the MAY_SIGN FLAG
so if this is zero it means that signing is disabled */ so if this is zero it means that signing is disabled */
cFYI(1, "Signing disabled"); cFYI(1, "Signing disabled");
if (server->secMode & SECMODE_SIGN_REQUIRED) { if (server->sec_mode & SECMODE_SIGN_REQUIRED) {
cERROR(1, "Server requires " cERROR(1, "Server requires "
"packet signing to be enabled in " "packet signing to be enabled in "
"/proc/fs/cifs/SecurityFlags."); "/proc/fs/cifs/SecurityFlags.");
rc = -EOPNOTSUPP; rc = -EOPNOTSUPP;
} }
server->secMode &= server->sec_mode &=
~(SECMODE_SIGN_ENABLED | SECMODE_SIGN_REQUIRED); ~(SECMODE_SIGN_ENABLED | SECMODE_SIGN_REQUIRED);
} else if ((secFlags & CIFSSEC_MUST_SIGN) == CIFSSEC_MUST_SIGN) { } else if ((secFlags & CIFSSEC_MUST_SIGN) == CIFSSEC_MUST_SIGN) {
/* signing required */ /* signing required */
cFYI(1, "Must sign - secFlags 0x%x", secFlags); cFYI(1, "Must sign - secFlags 0x%x", secFlags);
if ((server->secMode & if ((server->sec_mode &
(SECMODE_SIGN_ENABLED | SECMODE_SIGN_REQUIRED)) == 0) { (SECMODE_SIGN_ENABLED | SECMODE_SIGN_REQUIRED)) == 0) {
cERROR(1, "signing required but server lacks support"); cERROR(1, "signing required but server lacks support");
rc = -EOPNOTSUPP; rc = -EOPNOTSUPP;
} else } else
server->secMode |= SECMODE_SIGN_REQUIRED; server->sec_mode |= SECMODE_SIGN_REQUIRED;
} else { } else {
/* signing optional ie CIFSSEC_MAY_SIGN */ /* signing optional ie CIFSSEC_MAY_SIGN */
if ((server->secMode & SECMODE_SIGN_REQUIRED) == 0) if ((server->sec_mode & SECMODE_SIGN_REQUIRED) == 0)
server->secMode &= server->sec_mode &=
~(SECMODE_SIGN_ENABLED | SECMODE_SIGN_REQUIRED); ~(SECMODE_SIGN_ENABLED | SECMODE_SIGN_REQUIRED);
} }
@ -662,7 +662,7 @@ neg_err_exit:
} }
int int
CIFSSMBTDis(const int xid, struct cifsTconInfo *tcon) CIFSSMBTDis(const int xid, struct cifs_tcon *tcon)
{ {
struct smb_hdr *smb_buffer; struct smb_hdr *smb_buffer;
int rc = 0; int rc = 0;
@ -749,7 +749,7 @@ CIFSSMBEcho(struct TCP_Server_Info *server)
} }
int int
CIFSSMBLogoff(const int xid, struct cifsSesInfo *ses) CIFSSMBLogoff(const int xid, struct cifs_ses *ses)
{ {
LOGOFF_ANDX_REQ *pSMB; LOGOFF_ANDX_REQ *pSMB;
int rc = 0; int rc = 0;
@ -776,7 +776,7 @@ CIFSSMBLogoff(const int xid, struct cifsSesInfo *ses)
pSMB->hdr.Mid = GetNextMid(ses->server); pSMB->hdr.Mid = GetNextMid(ses->server);
if (ses->server->secMode & if (ses->server->sec_mode &
(SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED))
pSMB->hdr.Flags2 |= SMBFLG2_SECURITY_SIGNATURE; pSMB->hdr.Flags2 |= SMBFLG2_SECURITY_SIGNATURE;
@ -796,7 +796,7 @@ session_already_dead:
} }
int int
CIFSPOSIXDelFile(const int xid, struct cifsTconInfo *tcon, const char *fileName, CIFSPOSIXDelFile(const int xid, struct cifs_tcon *tcon, const char *fileName,
__u16 type, const struct nls_table *nls_codepage, int remap) __u16 type, const struct nls_table *nls_codepage, int remap)
{ {
TRANSACTION2_SPI_REQ *pSMB = NULL; TRANSACTION2_SPI_REQ *pSMB = NULL;
@ -871,7 +871,7 @@ PsxDelete:
} }
int int
CIFSSMBDelFile(const int xid, struct cifsTconInfo *tcon, const char *fileName, CIFSSMBDelFile(const int xid, struct cifs_tcon *tcon, const char *fileName,
const struct nls_table *nls_codepage, int remap) const struct nls_table *nls_codepage, int remap)
{ {
DELETE_FILE_REQ *pSMB = NULL; DELETE_FILE_REQ *pSMB = NULL;
@ -916,7 +916,7 @@ DelFileRetry:
} }
int int
CIFSSMBRmDir(const int xid, struct cifsTconInfo *tcon, const char *dirName, CIFSSMBRmDir(const int xid, struct cifs_tcon *tcon, const char *dirName,
const struct nls_table *nls_codepage, int remap) const struct nls_table *nls_codepage, int remap)
{ {
DELETE_DIRECTORY_REQ *pSMB = NULL; DELETE_DIRECTORY_REQ *pSMB = NULL;
@ -959,7 +959,7 @@ RmDirRetry:
} }
int int
CIFSSMBMkDir(const int xid, struct cifsTconInfo *tcon, CIFSSMBMkDir(const int xid, struct cifs_tcon *tcon,
const char *name, const struct nls_table *nls_codepage, int remap) const char *name, const struct nls_table *nls_codepage, int remap)
{ {
int rc = 0; int rc = 0;
@ -1002,7 +1002,7 @@ MkDirRetry:
} }
int int
CIFSPOSIXCreate(const int xid, struct cifsTconInfo *tcon, __u32 posix_flags, CIFSPOSIXCreate(const int xid, struct cifs_tcon *tcon, __u32 posix_flags,
__u64 mode, __u16 *netfid, FILE_UNIX_BASIC_INFO *pRetData, __u64 mode, __u16 *netfid, FILE_UNIX_BASIC_INFO *pRetData,
__u32 *pOplock, const char *name, __u32 *pOplock, const char *name,
const struct nls_table *nls_codepage, int remap) const struct nls_table *nls_codepage, int remap)
@ -1168,7 +1168,7 @@ access_flags_to_smbopen_mode(const int access_flags)
} }
int int
SMBLegacyOpen(const int xid, struct cifsTconInfo *tcon, SMBLegacyOpen(const int xid, struct cifs_tcon *tcon,
const char *fileName, const int openDisposition, const char *fileName, const int openDisposition,
const int access_flags, const int create_options, __u16 *netfid, const int access_flags, const int create_options, __u16 *netfid,
int *pOplock, FILE_ALL_INFO *pfile_info, int *pOplock, FILE_ALL_INFO *pfile_info,
@ -1275,7 +1275,7 @@ OldOpenRetry:
} }
int int
CIFSSMBOpen(const int xid, struct cifsTconInfo *tcon, CIFSSMBOpen(const int xid, struct cifs_tcon *tcon,
const char *fileName, const int openDisposition, const char *fileName, const int openDisposition,
const int access_flags, const int create_options, __u16 *netfid, const int access_flags, const int create_options, __u16 *netfid,
int *pOplock, FILE_ALL_INFO *pfile_info, int *pOplock, FILE_ALL_INFO *pfile_info,
@ -1390,7 +1390,7 @@ CIFSSMBRead(const int xid, struct cifs_io_parms *io_parms, unsigned int *nbytes,
__u32 pid = io_parms->pid; __u32 pid = io_parms->pid;
__u16 netfid = io_parms->netfid; __u16 netfid = io_parms->netfid;
__u64 offset = io_parms->offset; __u64 offset = io_parms->offset;
struct cifsTconInfo *tcon = io_parms->tcon; struct cifs_tcon *tcon = io_parms->tcon;
unsigned int count = io_parms->length; unsigned int count = io_parms->length;
cFYI(1, "Reading %d bytes on fid %d", count, netfid); cFYI(1, "Reading %d bytes on fid %d", count, netfid);
@ -1502,7 +1502,7 @@ CIFSSMBWrite(const int xid, struct cifs_io_parms *io_parms,
__u32 pid = io_parms->pid; __u32 pid = io_parms->pid;
__u16 netfid = io_parms->netfid; __u16 netfid = io_parms->netfid;
__u64 offset = io_parms->offset; __u64 offset = io_parms->offset;
struct cifsTconInfo *tcon = io_parms->tcon; struct cifs_tcon *tcon = io_parms->tcon;
unsigned int count = io_parms->length; unsigned int count = io_parms->length;
*nbytes = 0; *nbytes = 0;
@ -1714,7 +1714,7 @@ static void
cifs_writev_callback(struct mid_q_entry *mid) cifs_writev_callback(struct mid_q_entry *mid)
{ {
struct cifs_writedata *wdata = mid->callback_data; struct cifs_writedata *wdata = mid->callback_data;
struct cifsTconInfo *tcon = tlink_tcon(wdata->cfile->tlink); struct cifs_tcon *tcon = tlink_tcon(wdata->cfile->tlink);
unsigned int written; unsigned int written;
WRITE_RSP *smb = (WRITE_RSP *)mid->resp_buf; WRITE_RSP *smb = (WRITE_RSP *)mid->resp_buf;
@ -1763,7 +1763,7 @@ cifs_async_writev(struct cifs_writedata *wdata)
int i, rc = -EACCES; int i, rc = -EACCES;
WRITE_REQ *smb = NULL; WRITE_REQ *smb = NULL;
int wct; int wct;
struct cifsTconInfo *tcon = tlink_tcon(wdata->cfile->tlink); struct cifs_tcon *tcon = tlink_tcon(wdata->cfile->tlink);
struct inode *inode = wdata->cfile->dentry->d_inode; struct inode *inode = wdata->cfile->dentry->d_inode;
struct kvec *iov = NULL; struct kvec *iov = NULL;
@ -1866,7 +1866,7 @@ CIFSSMBWrite2(const int xid, struct cifs_io_parms *io_parms,
__u32 pid = io_parms->pid; __u32 pid = io_parms->pid;
__u16 netfid = io_parms->netfid; __u16 netfid = io_parms->netfid;
__u64 offset = io_parms->offset; __u64 offset = io_parms->offset;
struct cifsTconInfo *tcon = io_parms->tcon; struct cifs_tcon *tcon = io_parms->tcon;
unsigned int count = io_parms->length; unsigned int count = io_parms->length;
*nbytes = 0; *nbytes = 0;
@ -1964,7 +1964,7 @@ CIFSSMBWrite2(const int xid, struct cifs_io_parms *io_parms,
int int
CIFSSMBLock(const int xid, struct cifsTconInfo *tcon, CIFSSMBLock(const int xid, struct cifs_tcon *tcon,
const __u16 smb_file_id, const __u64 len, const __u16 smb_file_id, const __u64 len,
const __u64 offset, const __u32 numUnlock, const __u64 offset, const __u32 numUnlock,
const __u32 numLock, const __u8 lockType, const __u32 numLock, const __u8 lockType,
@ -2034,7 +2034,7 @@ CIFSSMBLock(const int xid, struct cifsTconInfo *tcon,
} }
int int
CIFSSMBPosixLock(const int xid, struct cifsTconInfo *tcon, CIFSSMBPosixLock(const int xid, struct cifs_tcon *tcon,
const __u16 smb_file_id, const int get_flag, const __u64 len, const __u16 smb_file_id, const int get_flag, const __u64 len,
struct file_lock *pLockData, const __u16 lock_type, struct file_lock *pLockData, const __u16 lock_type,
const bool waitFlag) const bool waitFlag)
@ -2172,7 +2172,7 @@ plk_err_exit:
int int
CIFSSMBClose(const int xid, struct cifsTconInfo *tcon, int smb_file_id) CIFSSMBClose(const int xid, struct cifs_tcon *tcon, int smb_file_id)
{ {
int rc = 0; int rc = 0;
CLOSE_REQ *pSMB = NULL; CLOSE_REQ *pSMB = NULL;
@ -2205,7 +2205,7 @@ CIFSSMBClose(const int xid, struct cifsTconInfo *tcon, int smb_file_id)
} }
int int
CIFSSMBFlush(const int xid, struct cifsTconInfo *tcon, int smb_file_id) CIFSSMBFlush(const int xid, struct cifs_tcon *tcon, int smb_file_id)
{ {
int rc = 0; int rc = 0;
FLUSH_REQ *pSMB = NULL; FLUSH_REQ *pSMB = NULL;
@ -2226,7 +2226,7 @@ CIFSSMBFlush(const int xid, struct cifsTconInfo *tcon, int smb_file_id)
} }
int int
CIFSSMBRename(const int xid, struct cifsTconInfo *tcon, CIFSSMBRename(const int xid, struct cifs_tcon *tcon,
const char *fromName, const char *toName, const char *fromName, const char *toName,
const struct nls_table *nls_codepage, int remap) const struct nls_table *nls_codepage, int remap)
{ {
@ -2293,7 +2293,7 @@ renameRetry:
return rc; return rc;
} }
int CIFSSMBRenameOpenFile(const int xid, struct cifsTconInfo *pTcon, int CIFSSMBRenameOpenFile(const int xid, struct cifs_tcon *pTcon,
int netfid, const char *target_name, int netfid, const char *target_name,
const struct nls_table *nls_codepage, int remap) const struct nls_table *nls_codepage, int remap)
{ {
@ -2373,7 +2373,7 @@ int CIFSSMBRenameOpenFile(const int xid, struct cifsTconInfo *pTcon,
} }
int int
CIFSSMBCopy(const int xid, struct cifsTconInfo *tcon, const char *fromName, CIFSSMBCopy(const int xid, struct cifs_tcon *tcon, const char *fromName,
const __u16 target_tid, const char *toName, const int flags, const __u16 target_tid, const char *toName, const int flags,
const struct nls_table *nls_codepage, int remap) const struct nls_table *nls_codepage, int remap)
{ {
@ -2441,7 +2441,7 @@ copyRetry:
} }
int int
CIFSUnixCreateSymLink(const int xid, struct cifsTconInfo *tcon, CIFSUnixCreateSymLink(const int xid, struct cifs_tcon *tcon,
const char *fromName, const char *toName, const char *fromName, const char *toName,
const struct nls_table *nls_codepage) const struct nls_table *nls_codepage)
{ {
@ -2530,7 +2530,7 @@ createSymLinkRetry:
} }
int int
CIFSUnixCreateHardLink(const int xid, struct cifsTconInfo *tcon, CIFSUnixCreateHardLink(const int xid, struct cifs_tcon *tcon,
const char *fromName, const char *toName, const char *fromName, const char *toName,
const struct nls_table *nls_codepage, int remap) const struct nls_table *nls_codepage, int remap)
{ {
@ -2615,7 +2615,7 @@ createHardLinkRetry:
} }
int int
CIFSCreateHardLink(const int xid, struct cifsTconInfo *tcon, CIFSCreateHardLink(const int xid, struct cifs_tcon *tcon,
const char *fromName, const char *toName, const char *fromName, const char *toName,
const struct nls_table *nls_codepage, int remap) const struct nls_table *nls_codepage, int remap)
{ {
@ -2687,7 +2687,7 @@ winCreateHardLinkRetry:
} }
int int
CIFSSMBUnixQuerySymLink(const int xid, struct cifsTconInfo *tcon, CIFSSMBUnixQuerySymLink(const int xid, struct cifs_tcon *tcon,
const unsigned char *searchName, char **symlinkinfo, const unsigned char *searchName, char **symlinkinfo,
const struct nls_table *nls_codepage) const struct nls_table *nls_codepage)
{ {
@ -2792,7 +2792,7 @@ querySymLinkRetry:
* it is not compiled in by default until callers fixed up and more tested. * it is not compiled in by default until callers fixed up and more tested.
*/ */
int int
CIFSSMBQueryReparseLinkInfo(const int xid, struct cifsTconInfo *tcon, CIFSSMBQueryReparseLinkInfo(const int xid, struct cifs_tcon *tcon,
const unsigned char *searchName, const unsigned char *searchName,
char *symlinkinfo, const int buflen, __u16 fid, char *symlinkinfo, const int buflen, __u16 fid,
const struct nls_table *nls_codepage) const struct nls_table *nls_codepage)
@ -3030,7 +3030,7 @@ static __u16 ACL_to_cifs_posix(char *parm_data, const char *pACL,
} }
int int
CIFSSMBGetPosixACL(const int xid, struct cifsTconInfo *tcon, CIFSSMBGetPosixACL(const int xid, struct cifs_tcon *tcon,
const unsigned char *searchName, const unsigned char *searchName,
char *acl_inf, const int buflen, const int acl_type, char *acl_inf, const int buflen, const int acl_type,
const struct nls_table *nls_codepage, int remap) const struct nls_table *nls_codepage, int remap)
@ -3118,7 +3118,7 @@ queryAclRetry:
} }
int int
CIFSSMBSetPosixACL(const int xid, struct cifsTconInfo *tcon, CIFSSMBSetPosixACL(const int xid, struct cifs_tcon *tcon,
const unsigned char *fileName, const unsigned char *fileName,
const char *local_acl, const int buflen, const char *local_acl, const int buflen,
const int acl_type, const int acl_type,
@ -3198,7 +3198,7 @@ setACLerrorExit:
/* BB fix tabs in this function FIXME BB */ /* BB fix tabs in this function FIXME BB */
int int
CIFSGetExtAttr(const int xid, struct cifsTconInfo *tcon, CIFSGetExtAttr(const int xid, struct cifs_tcon *tcon,
const int netfid, __u64 *pExtAttrBits, __u64 *pMask) const int netfid, __u64 *pExtAttrBits, __u64 *pMask)
{ {
int rc = 0; int rc = 0;
@ -3291,7 +3291,7 @@ GetExtAttrOut:
*/ */
static int static int
smb_init_nttransact(const __u16 sub_command, const int setup_count, smb_init_nttransact(const __u16 sub_command, const int setup_count,
const int parm_len, struct cifsTconInfo *tcon, const int parm_len, struct cifs_tcon *tcon,
void **ret_buf) void **ret_buf)
{ {
int rc; int rc;
@ -3374,7 +3374,7 @@ validate_ntransact(char *buf, char **ppparm, char **ppdata,
/* Get Security Descriptor (by handle) from remote server for a file or dir */ /* Get Security Descriptor (by handle) from remote server for a file or dir */
int int
CIFSSMBGetCIFSACL(const int xid, struct cifsTconInfo *tcon, __u16 fid, CIFSSMBGetCIFSACL(const int xid, struct cifs_tcon *tcon, __u16 fid,
struct cifs_ntsd **acl_inf, __u32 *pbuflen) struct cifs_ntsd **acl_inf, __u32 *pbuflen)
{ {
int rc = 0; int rc = 0;
@ -3466,7 +3466,7 @@ qsec_out:
} }
int int
CIFSSMBSetCIFSACL(const int xid, struct cifsTconInfo *tcon, __u16 fid, CIFSSMBSetCIFSACL(const int xid, struct cifs_tcon *tcon, __u16 fid,
struct cifs_ntsd *pntsd, __u32 acllen) struct cifs_ntsd *pntsd, __u32 acllen)
{ {
__u16 byte_count, param_count, data_count, param_offset, data_offset; __u16 byte_count, param_count, data_count, param_offset, data_offset;
@ -3532,7 +3532,7 @@ setCifsAclRetry:
/* Legacy Query Path Information call for lookup to old servers such /* Legacy Query Path Information call for lookup to old servers such
as Win9x/WinME */ as Win9x/WinME */
int SMBQueryInformation(const int xid, struct cifsTconInfo *tcon, int SMBQueryInformation(const int xid, struct cifs_tcon *tcon,
const unsigned char *searchName, const unsigned char *searchName,
FILE_ALL_INFO *pFinfo, FILE_ALL_INFO *pFinfo,
const struct nls_table *nls_codepage, int remap) const struct nls_table *nls_codepage, int remap)
@ -3600,7 +3600,7 @@ QInfRetry:
} }
int int
CIFSSMBQFileInfo(const int xid, struct cifsTconInfo *tcon, CIFSSMBQFileInfo(const int xid, struct cifs_tcon *tcon,
u16 netfid, FILE_ALL_INFO *pFindData) u16 netfid, FILE_ALL_INFO *pFindData)
{ {
struct smb_t2_qfi_req *pSMB = NULL; struct smb_t2_qfi_req *pSMB = NULL;
@ -3667,7 +3667,7 @@ QFileInfoRetry:
} }
int int
CIFSSMBQPathInfo(const int xid, struct cifsTconInfo *tcon, CIFSSMBQPathInfo(const int xid, struct cifs_tcon *tcon,
const unsigned char *searchName, const unsigned char *searchName,
FILE_ALL_INFO *pFindData, FILE_ALL_INFO *pFindData,
int legacy /* old style infolevel */, int legacy /* old style infolevel */,
@ -3768,7 +3768,7 @@ QPathInfoRetry:
} }
int int
CIFSSMBUnixQFileInfo(const int xid, struct cifsTconInfo *tcon, CIFSSMBUnixQFileInfo(const int xid, struct cifs_tcon *tcon,
u16 netfid, FILE_UNIX_BASIC_INFO *pFindData) u16 netfid, FILE_UNIX_BASIC_INFO *pFindData)
{ {
struct smb_t2_qfi_req *pSMB = NULL; struct smb_t2_qfi_req *pSMB = NULL;
@ -3837,7 +3837,7 @@ UnixQFileInfoRetry:
} }
int int
CIFSSMBUnixQPathInfo(const int xid, struct cifsTconInfo *tcon, CIFSSMBUnixQPathInfo(const int xid, struct cifs_tcon *tcon,
const unsigned char *searchName, const unsigned char *searchName,
FILE_UNIX_BASIC_INFO *pFindData, FILE_UNIX_BASIC_INFO *pFindData,
const struct nls_table *nls_codepage, int remap) const struct nls_table *nls_codepage, int remap)
@ -3923,7 +3923,7 @@ UnixQPathInfoRetry:
/* xid, tcon, searchName and codepage are input parms, rest are returned */ /* xid, tcon, searchName and codepage are input parms, rest are returned */
int int
CIFSFindFirst(const int xid, struct cifsTconInfo *tcon, CIFSFindFirst(const int xid, struct cifs_tcon *tcon,
const char *searchName, const char *searchName,
const struct nls_table *nls_codepage, const struct nls_table *nls_codepage,
__u16 *pnetfid, __u16 *pnetfid,
@ -4071,7 +4071,7 @@ findFirstRetry:
return rc; return rc;
} }
int CIFSFindNext(const int xid, struct cifsTconInfo *tcon, int CIFSFindNext(const int xid, struct cifs_tcon *tcon,
__u16 searchHandle, struct cifs_search_info *psrch_inf) __u16 searchHandle, struct cifs_search_info *psrch_inf)
{ {
TRANSACTION2_FNEXT_REQ *pSMB = NULL; TRANSACTION2_FNEXT_REQ *pSMB = NULL;
@ -4209,7 +4209,7 @@ FNext2_err_exit:
} }
int int
CIFSFindClose(const int xid, struct cifsTconInfo *tcon, CIFSFindClose(const int xid, struct cifs_tcon *tcon,
const __u16 searchHandle) const __u16 searchHandle)
{ {
int rc = 0; int rc = 0;
@ -4241,7 +4241,7 @@ CIFSFindClose(const int xid, struct cifsTconInfo *tcon,
} }
int int
CIFSGetSrvInodeNumber(const int xid, struct cifsTconInfo *tcon, CIFSGetSrvInodeNumber(const int xid, struct cifs_tcon *tcon,
const unsigned char *searchName, const unsigned char *searchName,
__u64 *inode_number, __u64 *inode_number,
const struct nls_table *nls_codepage, int remap) const struct nls_table *nls_codepage, int remap)
@ -4443,7 +4443,7 @@ parse_DFS_referrals_exit:
} }
int int
CIFSGetDFSRefer(const int xid, struct cifsSesInfo *ses, CIFSGetDFSRefer(const int xid, struct cifs_ses *ses,
const unsigned char *searchName, const unsigned char *searchName,
struct dfs_info3_param **target_nodes, struct dfs_info3_param **target_nodes,
unsigned int *num_of_nodes, unsigned int *num_of_nodes,
@ -4492,7 +4492,7 @@ getDFSRetry:
} }
if (ses->server) { if (ses->server) {
if (ses->server->secMode & if (ses->server->sec_mode &
(SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED))
pSMB->hdr.Flags2 |= SMBFLG2_SECURITY_SIGNATURE; pSMB->hdr.Flags2 |= SMBFLG2_SECURITY_SIGNATURE;
} }
@ -4557,7 +4557,7 @@ GetDFSRefExit:
/* Query File System Info such as free space to old servers such as Win 9x */ /* Query File System Info such as free space to old servers such as Win 9x */
int int
SMBOldQFSInfo(const int xid, struct cifsTconInfo *tcon, struct kstatfs *FSData) SMBOldQFSInfo(const int xid, struct cifs_tcon *tcon, struct kstatfs *FSData)
{ {
/* level 0x01 SMB_QUERY_FILE_SYSTEM_INFO */ /* level 0x01 SMB_QUERY_FILE_SYSTEM_INFO */
TRANSACTION2_QFSI_REQ *pSMB = NULL; TRANSACTION2_QFSI_REQ *pSMB = NULL;
@ -4636,7 +4636,7 @@ oldQFSInfoRetry:
} }
int int
CIFSSMBQFSInfo(const int xid, struct cifsTconInfo *tcon, struct kstatfs *FSData) CIFSSMBQFSInfo(const int xid, struct cifs_tcon *tcon, struct kstatfs *FSData)
{ {
/* level 0x103 SMB_QUERY_FILE_SYSTEM_INFO */ /* level 0x103 SMB_QUERY_FILE_SYSTEM_INFO */
TRANSACTION2_QFSI_REQ *pSMB = NULL; TRANSACTION2_QFSI_REQ *pSMB = NULL;
@ -4715,7 +4715,7 @@ QFSInfoRetry:
} }
int int
CIFSSMBQFSAttributeInfo(const int xid, struct cifsTconInfo *tcon) CIFSSMBQFSAttributeInfo(const int xid, struct cifs_tcon *tcon)
{ {
/* level 0x105 SMB_QUERY_FILE_SYSTEM_INFO */ /* level 0x105 SMB_QUERY_FILE_SYSTEM_INFO */
TRANSACTION2_QFSI_REQ *pSMB = NULL; TRANSACTION2_QFSI_REQ *pSMB = NULL;
@ -4785,7 +4785,7 @@ QFSAttributeRetry:
} }
int int
CIFSSMBQFSDeviceInfo(const int xid, struct cifsTconInfo *tcon) CIFSSMBQFSDeviceInfo(const int xid, struct cifs_tcon *tcon)
{ {
/* level 0x104 SMB_QUERY_FILE_SYSTEM_INFO */ /* level 0x104 SMB_QUERY_FILE_SYSTEM_INFO */
TRANSACTION2_QFSI_REQ *pSMB = NULL; TRANSACTION2_QFSI_REQ *pSMB = NULL;
@ -4856,7 +4856,7 @@ QFSDeviceRetry:
} }
int int
CIFSSMBQFSUnixInfo(const int xid, struct cifsTconInfo *tcon) CIFSSMBQFSUnixInfo(const int xid, struct cifs_tcon *tcon)
{ {
/* level 0x200 SMB_QUERY_CIFS_UNIX_INFO */ /* level 0x200 SMB_QUERY_CIFS_UNIX_INFO */
TRANSACTION2_QFSI_REQ *pSMB = NULL; TRANSACTION2_QFSI_REQ *pSMB = NULL;
@ -4926,7 +4926,7 @@ QFSUnixRetry:
} }
int int
CIFSSMBSetFSUnixInfo(const int xid, struct cifsTconInfo *tcon, __u64 cap) CIFSSMBSetFSUnixInfo(const int xid, struct cifs_tcon *tcon, __u64 cap)
{ {
/* level 0x200 SMB_SET_CIFS_UNIX_INFO */ /* level 0x200 SMB_SET_CIFS_UNIX_INFO */
TRANSACTION2_SETFSI_REQ *pSMB = NULL; TRANSACTION2_SETFSI_REQ *pSMB = NULL;
@ -5000,7 +5000,7 @@ SETFSUnixRetry:
int int
CIFSSMBQFSPosixInfo(const int xid, struct cifsTconInfo *tcon, CIFSSMBQFSPosixInfo(const int xid, struct cifs_tcon *tcon,
struct kstatfs *FSData) struct kstatfs *FSData)
{ {
/* level 0x201 SMB_QUERY_CIFS_POSIX_INFO */ /* level 0x201 SMB_QUERY_CIFS_POSIX_INFO */
@ -5093,7 +5093,7 @@ QFSPosixRetry:
in Samba which this routine can run into */ in Samba which this routine can run into */
int int
CIFSSMBSetEOF(const int xid, struct cifsTconInfo *tcon, const char *fileName, CIFSSMBSetEOF(const int xid, struct cifs_tcon *tcon, const char *fileName,
__u64 size, bool SetAllocation, __u64 size, bool SetAllocation,
const struct nls_table *nls_codepage, int remap) const struct nls_table *nls_codepage, int remap)
{ {
@ -5182,7 +5182,7 @@ SetEOFRetry:
} }
int int
CIFSSMBSetFileSize(const int xid, struct cifsTconInfo *tcon, __u64 size, CIFSSMBSetFileSize(const int xid, struct cifs_tcon *tcon, __u64 size,
__u16 fid, __u32 pid_of_opener, bool SetAllocation) __u16 fid, __u32 pid_of_opener, bool SetAllocation)
{ {
struct smb_com_transaction2_sfi_req *pSMB = NULL; struct smb_com_transaction2_sfi_req *pSMB = NULL;
@ -5264,7 +5264,7 @@ CIFSSMBSetFileSize(const int xid, struct cifsTconInfo *tcon, __u64 size,
time and resort to the original setpathinfo level which takes the ancient time and resort to the original setpathinfo level which takes the ancient
DOS time format with 2 second granularity */ DOS time format with 2 second granularity */
int int
CIFSSMBSetFileInfo(const int xid, struct cifsTconInfo *tcon, CIFSSMBSetFileInfo(const int xid, struct cifs_tcon *tcon,
const FILE_BASIC_INFO *data, __u16 fid, __u32 pid_of_opener) const FILE_BASIC_INFO *data, __u16 fid, __u32 pid_of_opener)
{ {
struct smb_com_transaction2_sfi_req *pSMB = NULL; struct smb_com_transaction2_sfi_req *pSMB = NULL;
@ -5326,7 +5326,7 @@ CIFSSMBSetFileInfo(const int xid, struct cifsTconInfo *tcon,
} }
int int
CIFSSMBSetFileDisposition(const int xid, struct cifsTconInfo *tcon, CIFSSMBSetFileDisposition(const int xid, struct cifs_tcon *tcon,
bool delete_file, __u16 fid, __u32 pid_of_opener) bool delete_file, __u16 fid, __u32 pid_of_opener)
{ {
struct smb_com_transaction2_sfi_req *pSMB = NULL; struct smb_com_transaction2_sfi_req *pSMB = NULL;
@ -5382,7 +5382,7 @@ CIFSSMBSetFileDisposition(const int xid, struct cifsTconInfo *tcon,
} }
int int
CIFSSMBSetPathInfo(const int xid, struct cifsTconInfo *tcon, CIFSSMBSetPathInfo(const int xid, struct cifs_tcon *tcon,
const char *fileName, const FILE_BASIC_INFO *data, const char *fileName, const FILE_BASIC_INFO *data,
const struct nls_table *nls_codepage, int remap) const struct nls_table *nls_codepage, int remap)
{ {
@ -5466,7 +5466,7 @@ SetTimesRetry:
handling it anyway and NT4 was what we thought it would be needed for handling it anyway and NT4 was what we thought it would be needed for
Do not delete it until we prove whether needed for Win9x though */ Do not delete it until we prove whether needed for Win9x though */
int int
CIFSSMBSetAttrLegacy(int xid, struct cifsTconInfo *tcon, char *fileName, CIFSSMBSetAttrLegacy(int xid, struct cifs_tcon *tcon, char *fileName,
__u16 dos_attrs, const struct nls_table *nls_codepage) __u16 dos_attrs, const struct nls_table *nls_codepage)
{ {
SETATTR_REQ *pSMB = NULL; SETATTR_REQ *pSMB = NULL;
@ -5554,7 +5554,7 @@ cifs_fill_unix_set_info(FILE_UNIX_BASIC_INFO *data_offset,
} }
int int
CIFSSMBUnixSetFileInfo(const int xid, struct cifsTconInfo *tcon, CIFSSMBUnixSetFileInfo(const int xid, struct cifs_tcon *tcon,
const struct cifs_unix_set_info_args *args, const struct cifs_unix_set_info_args *args,
u16 fid, u32 pid_of_opener) u16 fid, u32 pid_of_opener)
{ {
@ -5617,7 +5617,7 @@ CIFSSMBUnixSetFileInfo(const int xid, struct cifsTconInfo *tcon,
} }
int int
CIFSSMBUnixSetPathInfo(const int xid, struct cifsTconInfo *tcon, char *fileName, CIFSSMBUnixSetPathInfo(const int xid, struct cifs_tcon *tcon, char *fileName,
const struct cifs_unix_set_info_args *args, const struct cifs_unix_set_info_args *args,
const struct nls_table *nls_codepage, int remap) const struct nls_table *nls_codepage, int remap)
{ {
@ -5704,7 +5704,7 @@ setPermsRetry:
* the data isn't copied to it, but the length is returned. * the data isn't copied to it, but the length is returned.
*/ */
ssize_t ssize_t
CIFSSMBQAllEAs(const int xid, struct cifsTconInfo *tcon, CIFSSMBQAllEAs(const int xid, struct cifs_tcon *tcon,
const unsigned char *searchName, const unsigned char *ea_name, const unsigned char *searchName, const unsigned char *ea_name,
char *EAData, size_t buf_size, char *EAData, size_t buf_size,
const struct nls_table *nls_codepage, int remap) const struct nls_table *nls_codepage, int remap)
@ -5885,7 +5885,7 @@ QAllEAsOut:
} }
int int
CIFSSMBSetEA(const int xid, struct cifsTconInfo *tcon, const char *fileName, CIFSSMBSetEA(const int xid, struct cifs_tcon *tcon, const char *fileName,
const char *ea_name, const void *ea_value, const char *ea_name, const void *ea_value,
const __u16 ea_value_len, const struct nls_table *nls_codepage, const __u16 ea_value_len, const struct nls_table *nls_codepage,
int remap) int remap)
@ -6012,7 +6012,7 @@ SetEARetry:
* incompatible for network fs clients, we could instead simply * incompatible for network fs clients, we could instead simply
* expose this config flag by adding a future cifs (and smb2) notify ioctl. * expose this config flag by adding a future cifs (and smb2) notify ioctl.
*/ */
int CIFSSMBNotify(const int xid, struct cifsTconInfo *tcon, int CIFSSMBNotify(const int xid, struct cifs_tcon *tcon,
const int notify_subdirs, const __u16 netfid, const int notify_subdirs, const __u16 netfid,
__u32 filter, struct file *pfile, int multishot, __u32 filter, struct file *pfile, int multishot,
const struct nls_table *nls_codepage) const struct nls_table *nls_codepage)

View File

@ -79,8 +79,8 @@ cifs_reconnect(struct TCP_Server_Info *server)
{ {
int rc = 0; int rc = 0;
struct list_head *tmp, *tmp2; struct list_head *tmp, *tmp2;
struct cifsSesInfo *ses; struct cifs_ses *ses;
struct cifsTconInfo *tcon; struct cifs_tcon *tcon;
struct mid_q_entry *mid_entry; struct mid_q_entry *mid_entry;
struct list_head retry_list; struct list_head retry_list;
@ -102,11 +102,11 @@ cifs_reconnect(struct TCP_Server_Info *server)
cFYI(1, "%s: marking sessions and tcons for reconnect", __func__); cFYI(1, "%s: marking sessions and tcons for reconnect", __func__);
spin_lock(&cifs_tcp_ses_lock); spin_lock(&cifs_tcp_ses_lock);
list_for_each(tmp, &server->smb_ses_list) { list_for_each(tmp, &server->smb_ses_list) {
ses = list_entry(tmp, struct cifsSesInfo, smb_ses_list); ses = list_entry(tmp, struct cifs_ses, smb_ses_list);
ses->need_reconnect = true; ses->need_reconnect = true;
ses->ipc_tid = 0; ses->ipc_tid = 0;
list_for_each(tmp2, &ses->tcon_list) { list_for_each(tmp2, &ses->tcon_list) {
tcon = list_entry(tmp2, struct cifsTconInfo, tcon_list); tcon = list_entry(tmp2, struct cifs_tcon, tcon_list);
tcon->need_reconnect = true; tcon->need_reconnect = true;
} }
} }
@ -1597,10 +1597,10 @@ match_security(struct TCP_Server_Info *server, struct smb_vol *vol)
/* now check if signing mode is acceptable */ /* now check if signing mode is acceptable */
if ((secFlags & CIFSSEC_MAY_SIGN) == 0 && if ((secFlags & CIFSSEC_MAY_SIGN) == 0 &&
(server->secMode & SECMODE_SIGN_REQUIRED)) (server->sec_mode & SECMODE_SIGN_REQUIRED))
return false; return false;
else if (((secFlags & CIFSSEC_MUST_SIGN) == CIFSSEC_MUST_SIGN) && else if (((secFlags & CIFSSEC_MUST_SIGN) == CIFSSEC_MUST_SIGN) &&
(server->secMode & (server->sec_mode &
(SECMODE_SIGN_ENABLED|SECMODE_SIGN_REQUIRED)) == 0) (SECMODE_SIGN_ENABLED|SECMODE_SIGN_REQUIRED)) == 0)
return false; return false;
@ -1827,7 +1827,7 @@ out_err:
return ERR_PTR(rc); return ERR_PTR(rc);
} }
static int match_session(struct cifsSesInfo *ses, struct smb_vol *vol) static int match_session(struct cifs_ses *ses, struct smb_vol *vol)
{ {
switch (ses->server->secType) { switch (ses->server->secType) {
case Kerberos: case Kerberos:
@ -1851,10 +1851,10 @@ static int match_session(struct cifsSesInfo *ses, struct smb_vol *vol)
return 1; return 1;
} }
static struct cifsSesInfo * static struct cifs_ses *
cifs_find_smb_ses(struct TCP_Server_Info *server, struct smb_vol *vol) cifs_find_smb_ses(struct TCP_Server_Info *server, struct smb_vol *vol)
{ {
struct cifsSesInfo *ses; struct cifs_ses *ses;
spin_lock(&cifs_tcp_ses_lock); spin_lock(&cifs_tcp_ses_lock);
list_for_each_entry(ses, &server->smb_ses_list, smb_ses_list) { list_for_each_entry(ses, &server->smb_ses_list, smb_ses_list) {
@ -1869,7 +1869,7 @@ cifs_find_smb_ses(struct TCP_Server_Info *server, struct smb_vol *vol)
} }
static void static void
cifs_put_smb_ses(struct cifsSesInfo *ses) cifs_put_smb_ses(struct cifs_ses *ses)
{ {
int xid; int xid;
struct TCP_Server_Info *server = ses->server; struct TCP_Server_Info *server = ses->server;
@ -1895,11 +1895,11 @@ cifs_put_smb_ses(struct cifsSesInfo *ses)
static bool warned_on_ntlm; /* globals init to false automatically */ static bool warned_on_ntlm; /* globals init to false automatically */
static struct cifsSesInfo * static struct cifs_ses *
cifs_get_smb_ses(struct TCP_Server_Info *server, struct smb_vol *volume_info) cifs_get_smb_ses(struct TCP_Server_Info *server, struct smb_vol *volume_info)
{ {
int rc = -ENOMEM, xid; int rc = -ENOMEM, xid;
struct cifsSesInfo *ses; struct cifs_ses *ses;
struct sockaddr_in *addr = (struct sockaddr_in *)&server->dstaddr; struct sockaddr_in *addr = (struct sockaddr_in *)&server->dstaddr;
struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)&server->dstaddr; struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)&server->dstaddr;
@ -2002,7 +2002,7 @@ get_ses_fail:
return ERR_PTR(rc); return ERR_PTR(rc);
} }
static int match_tcon(struct cifsTconInfo *tcon, const char *unc) static int match_tcon(struct cifs_tcon *tcon, const char *unc)
{ {
if (tcon->tidStatus == CifsExiting) if (tcon->tidStatus == CifsExiting)
return 0; return 0;
@ -2011,15 +2011,15 @@ static int match_tcon(struct cifsTconInfo *tcon, const char *unc)
return 1; return 1;
} }
static struct cifsTconInfo * static struct cifs_tcon *
cifs_find_tcon(struct cifsSesInfo *ses, const char *unc) cifs_find_tcon(struct cifs_ses *ses, const char *unc)
{ {
struct list_head *tmp; struct list_head *tmp;
struct cifsTconInfo *tcon; struct cifs_tcon *tcon;
spin_lock(&cifs_tcp_ses_lock); spin_lock(&cifs_tcp_ses_lock);
list_for_each(tmp, &ses->tcon_list) { list_for_each(tmp, &ses->tcon_list) {
tcon = list_entry(tmp, struct cifsTconInfo, tcon_list); tcon = list_entry(tmp, struct cifs_tcon, tcon_list);
if (!match_tcon(tcon, unc)) if (!match_tcon(tcon, unc))
continue; continue;
++tcon->tc_count; ++tcon->tc_count;
@ -2031,10 +2031,10 @@ cifs_find_tcon(struct cifsSesInfo *ses, const char *unc)
} }
static void static void
cifs_put_tcon(struct cifsTconInfo *tcon) cifs_put_tcon(struct cifs_tcon *tcon)
{ {
int xid; int xid;
struct cifsSesInfo *ses = tcon->ses; struct cifs_ses *ses = tcon->ses;
cFYI(1, "%s: tc_count=%d\n", __func__, tcon->tc_count); cFYI(1, "%s: tc_count=%d\n", __func__, tcon->tc_count);
spin_lock(&cifs_tcp_ses_lock); spin_lock(&cifs_tcp_ses_lock);
@ -2055,11 +2055,11 @@ cifs_put_tcon(struct cifsTconInfo *tcon)
cifs_put_smb_ses(ses); cifs_put_smb_ses(ses);
} }
static struct cifsTconInfo * static struct cifs_tcon *
cifs_get_tcon(struct cifsSesInfo *ses, struct smb_vol *volume_info) cifs_get_tcon(struct cifs_ses *ses, struct smb_vol *volume_info)
{ {
int rc, xid; int rc, xid;
struct cifsTconInfo *tcon; struct cifs_tcon *tcon;
tcon = cifs_find_tcon(ses, volume_info->UNC); tcon = cifs_find_tcon(ses, volume_info->UNC);
if (tcon) { if (tcon) {
@ -2197,8 +2197,8 @@ cifs_match_super(struct super_block *sb, void *data)
struct smb_vol *volume_info; struct smb_vol *volume_info;
struct cifs_sb_info *cifs_sb; struct cifs_sb_info *cifs_sb;
struct TCP_Server_Info *tcp_srv; struct TCP_Server_Info *tcp_srv;
struct cifsSesInfo *ses; struct cifs_ses *ses;
struct cifsTconInfo *tcon; struct cifs_tcon *tcon;
struct tcon_link *tlink; struct tcon_link *tlink;
struct sockaddr_storage addr; struct sockaddr_storage addr;
int rc = 0; int rc = 0;
@ -2243,7 +2243,7 @@ out:
} }
int int
get_dfs_path(int xid, struct cifsSesInfo *pSesInfo, const char *old_path, get_dfs_path(int xid, struct cifs_ses *pSesInfo, const char *old_path,
const struct nls_table *nls_codepage, unsigned int *pnum_referrals, const struct nls_table *nls_codepage, unsigned int *pnum_referrals,
struct dfs_info3_param **preferrals, int remap) struct dfs_info3_param **preferrals, int remap)
{ {
@ -2542,7 +2542,7 @@ ip_connect(struct TCP_Server_Info *server)
return generic_ip_connect(server); return generic_ip_connect(server);
} }
void reset_cifs_unix_caps(int xid, struct cifsTconInfo *tcon, void reset_cifs_unix_caps(int xid, struct cifs_tcon *tcon,
struct super_block *sb, struct smb_vol *vol_info) struct super_block *sb, struct smb_vol *vol_info)
{ {
/* if we are reconnecting then should we check to see if /* if we are reconnecting then should we check to see if
@ -2771,7 +2771,7 @@ void cifs_setup_cifs_sb(struct smb_vol *pvolume_info,
#define CIFS_DEFAULT_WSIZE (1024 * 1024) #define CIFS_DEFAULT_WSIZE (1024 * 1024)
static unsigned int static unsigned int
cifs_negotiate_wsize(struct cifsTconInfo *tcon, struct smb_vol *pvolume_info) cifs_negotiate_wsize(struct cifs_tcon *tcon, struct smb_vol *pvolume_info)
{ {
__u64 unix_cap = le64_to_cpu(tcon->fsUnixInfo.Capability); __u64 unix_cap = le64_to_cpu(tcon->fsUnixInfo.Capability);
struct TCP_Server_Info *server = tcon->ses->server; struct TCP_Server_Info *server = tcon->ses->server;
@ -2793,7 +2793,7 @@ cifs_negotiate_wsize(struct cifsTconInfo *tcon, struct smb_vol *pvolume_info)
} }
static int static int
is_path_accessible(int xid, struct cifsTconInfo *tcon, is_path_accessible(int xid, struct cifs_tcon *tcon,
struct cifs_sb_info *cifs_sb, const char *full_path) struct cifs_sb_info *cifs_sb, const char *full_path)
{ {
int rc; int rc;
@ -2868,7 +2868,7 @@ build_unc_path_to_root(const struct smb_vol *volume_info,
* determine whether there were referrals. * determine whether there were referrals.
*/ */
static int static int
expand_dfs_referral(int xid, struct cifsSesInfo *pSesInfo, expand_dfs_referral(int xid, struct cifs_ses *pSesInfo,
struct smb_vol *volume_info, struct cifs_sb_info *cifs_sb, struct smb_vol *volume_info, struct cifs_sb_info *cifs_sb,
int check_prefix) int check_prefix)
{ {
@ -2973,8 +2973,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
{ {
int rc = 0; int rc = 0;
int xid; int xid;
struct cifsSesInfo *pSesInfo; struct cifs_ses *pSesInfo;
struct cifsTconInfo *tcon; struct cifs_tcon *tcon;
struct TCP_Server_Info *srvTcp; struct TCP_Server_Info *srvTcp;
char *full_path; char *full_path;
struct tcon_link *tlink; struct tcon_link *tlink;
@ -3172,8 +3172,8 @@ out:
} }
int int
CIFSTCon(unsigned int xid, struct cifsSesInfo *ses, CIFSTCon(unsigned int xid, struct cifs_ses *ses,
const char *tree, struct cifsTconInfo *tcon, const char *tree, struct cifs_tcon *tcon,
const struct nls_table *nls_codepage) const struct nls_table *nls_codepage)
{ {
struct smb_hdr *smb_buffer; struct smb_hdr *smb_buffer;
@ -3205,7 +3205,7 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses,
pSMB->AndXCommand = 0xFF; pSMB->AndXCommand = 0xFF;
pSMB->Flags = cpu_to_le16(TCON_EXTENDED_SECINFO); pSMB->Flags = cpu_to_le16(TCON_EXTENDED_SECINFO);
bcc_ptr = &pSMB->Password[0]; bcc_ptr = &pSMB->Password[0];
if ((ses->server->secMode) & SECMODE_USER) { if ((ses->server->sec_mode) & SECMODE_USER) {
pSMB->PasswordLength = cpu_to_le16(1); /* minimum */ pSMB->PasswordLength = cpu_to_le16(1); /* minimum */
*bcc_ptr = 0; /* password is null byte */ *bcc_ptr = 0; /* password is null byte */
bcc_ptr++; /* skip password */ bcc_ptr++; /* skip password */
@ -3222,7 +3222,7 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses,
if ((global_secflags & CIFSSEC_MAY_LANMAN) && if ((global_secflags & CIFSSEC_MAY_LANMAN) &&
(ses->server->secType == LANMAN)) (ses->server->secType == LANMAN))
calc_lanman_hash(tcon->password, ses->server->cryptkey, calc_lanman_hash(tcon->password, ses->server->cryptkey,
ses->server->secMode & ses->server->sec_mode &
SECMODE_PW_ENCRYPT ? true : false, SECMODE_PW_ENCRYPT ? true : false,
bcc_ptr); bcc_ptr);
else else
@ -3238,7 +3238,7 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses,
} }
} }
if (ses->server->secMode & if (ses->server->sec_mode &
(SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED))
smb_buffer->Flags2 |= SMBFLG2_SECURITY_SIGNATURE; smb_buffer->Flags2 |= SMBFLG2_SECURITY_SIGNATURE;
@ -3353,7 +3353,7 @@ cifs_umount(struct super_block *sb, struct cifs_sb_info *cifs_sb)
return 0; return 0;
} }
int cifs_negotiate_protocol(unsigned int xid, struct cifsSesInfo *ses) int cifs_negotiate_protocol(unsigned int xid, struct cifs_ses *ses)
{ {
int rc = 0; int rc = 0;
struct TCP_Server_Info *server = ses->server; struct TCP_Server_Info *server = ses->server;
@ -3383,7 +3383,7 @@ int cifs_negotiate_protocol(unsigned int xid, struct cifsSesInfo *ses)
} }
int cifs_setup_session(unsigned int xid, struct cifsSesInfo *ses, int cifs_setup_session(unsigned int xid, struct cifs_ses *ses,
struct nls_table *nls_info) struct nls_table *nls_info)
{ {
int rc = 0; int rc = 0;
@ -3395,7 +3395,7 @@ int cifs_setup_session(unsigned int xid, struct cifsSesInfo *ses,
ses->capabilities &= (~CAP_UNIX); ses->capabilities &= (~CAP_UNIX);
cFYI(1, "Security Mode: 0x%x Capabilities: 0x%x TimeAdjust: %d", cFYI(1, "Security Mode: 0x%x Capabilities: 0x%x TimeAdjust: %d",
server->secMode, server->capabilities, server->timeAdj); server->sec_mode, server->capabilities, server->timeAdj);
rc = CIFS_SessSetup(xid, ses, nls_info); rc = CIFS_SessSetup(xid, ses, nls_info);
if (rc) { if (rc) {
@ -3427,12 +3427,12 @@ int cifs_setup_session(unsigned int xid, struct cifsSesInfo *ses,
return rc; return rc;
} }
static struct cifsTconInfo * static struct cifs_tcon *
cifs_construct_tcon(struct cifs_sb_info *cifs_sb, uid_t fsuid) cifs_construct_tcon(struct cifs_sb_info *cifs_sb, uid_t fsuid)
{ {
struct cifsTconInfo *master_tcon = cifs_sb_master_tcon(cifs_sb); struct cifs_tcon *master_tcon = cifs_sb_master_tcon(cifs_sb);
struct cifsSesInfo *ses; struct cifs_ses *ses;
struct cifsTconInfo *tcon = NULL; struct cifs_tcon *tcon = NULL;
struct smb_vol *vol_info; struct smb_vol *vol_info;
char username[28]; /* big enough for "krb50x" + hex of ULONG_MAX 6+16 */ char username[28]; /* big enough for "krb50x" + hex of ULONG_MAX 6+16 */
/* We used to have this as MAX_USERNAME which is */ /* We used to have this as MAX_USERNAME which is */
@ -3465,7 +3465,7 @@ cifs_construct_tcon(struct cifs_sb_info *cifs_sb, uid_t fsuid)
ses = cifs_get_smb_ses(master_tcon->ses->server, vol_info); ses = cifs_get_smb_ses(master_tcon->ses->server, vol_info);
if (IS_ERR(ses)) { if (IS_ERR(ses)) {
tcon = (struct cifsTconInfo *)ses; tcon = (struct cifs_tcon *)ses;
cifs_put_tcp_session(master_tcon->ses->server); cifs_put_tcp_session(master_tcon->ses->server);
goto out; goto out;
} }
@ -3490,7 +3490,7 @@ cifs_sb_master_tlink(struct cifs_sb_info *cifs_sb)
return cifs_sb->master_tlink; return cifs_sb->master_tlink;
} }
struct cifsTconInfo * struct cifs_tcon *
cifs_sb_master_tcon(struct cifs_sb_info *cifs_sb) cifs_sb_master_tcon(struct cifs_sb_info *cifs_sb)
{ {
return tlink_tcon(cifs_sb_master_tlink(cifs_sb)); return tlink_tcon(cifs_sb_master_tlink(cifs_sb));

View File

@ -54,7 +54,7 @@ build_path_from_dentry(struct dentry *direntry)
char *full_path; char *full_path;
char dirsep; char dirsep;
struct cifs_sb_info *cifs_sb = CIFS_SB(direntry->d_sb); struct cifs_sb_info *cifs_sb = CIFS_SB(direntry->d_sb);
struct cifsTconInfo *tcon = cifs_sb_master_tcon(cifs_sb); struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb);
if (direntry == NULL) if (direntry == NULL)
return NULL; /* not much we can do if dentry is freed and return NULL; /* not much we can do if dentry is freed and
@ -149,7 +149,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
__u16 fileHandle; __u16 fileHandle;
struct cifs_sb_info *cifs_sb; struct cifs_sb_info *cifs_sb;
struct tcon_link *tlink; struct tcon_link *tlink;
struct cifsTconInfo *tcon; struct cifs_tcon *tcon;
char *full_path = NULL; char *full_path = NULL;
FILE_ALL_INFO *buf = NULL; FILE_ALL_INFO *buf = NULL;
struct inode *newinode = NULL; struct inode *newinode = NULL;
@ -353,7 +353,7 @@ int cifs_mknod(struct inode *inode, struct dentry *direntry, int mode,
int xid; int xid;
struct cifs_sb_info *cifs_sb; struct cifs_sb_info *cifs_sb;
struct tcon_link *tlink; struct tcon_link *tlink;
struct cifsTconInfo *pTcon; struct cifs_tcon *pTcon;
struct cifs_io_parms io_parms; struct cifs_io_parms io_parms;
char *full_path = NULL; char *full_path = NULL;
struct inode *newinode = NULL; struct inode *newinode = NULL;
@ -485,7 +485,7 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry,
bool posix_open = false; bool posix_open = false;
struct cifs_sb_info *cifs_sb; struct cifs_sb_info *cifs_sb;
struct tcon_link *tlink; struct tcon_link *tlink;
struct cifsTconInfo *pTcon; struct cifs_tcon *pTcon;
struct cifsFileInfo *cfile; struct cifsFileInfo *cfile;
struct inode *newInode = NULL; struct inode *newInode = NULL;
char *full_path = NULL; char *full_path = NULL;

View File

@ -114,7 +114,7 @@ int cifs_posix_open(char *full_path, struct inode **pinode,
struct cifs_sb_info *cifs_sb = CIFS_SB(sb); struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
struct cifs_fattr fattr; struct cifs_fattr fattr;
struct tcon_link *tlink; struct tcon_link *tlink;
struct cifsTconInfo *tcon; struct cifs_tcon *tcon;
cFYI(1, "posix open %s", full_path); cFYI(1, "posix open %s", full_path);
@ -168,7 +168,7 @@ posix_open_ret:
static int static int
cifs_nt_open(char *full_path, struct inode *inode, struct cifs_sb_info *cifs_sb, cifs_nt_open(char *full_path, struct inode *inode, struct cifs_sb_info *cifs_sb,
struct cifsTconInfo *tcon, unsigned int f_flags, __u32 *poplock, struct cifs_tcon *tcon, unsigned int f_flags, __u32 *poplock,
__u16 *pnetfid, int xid) __u16 *pnetfid, int xid)
{ {
int rc; int rc;
@ -285,7 +285,7 @@ cifs_new_fileinfo(__u16 fileHandle, struct file *file,
void cifsFileInfo_put(struct cifsFileInfo *cifs_file) void cifsFileInfo_put(struct cifsFileInfo *cifs_file)
{ {
struct inode *inode = cifs_file->dentry->d_inode; struct inode *inode = cifs_file->dentry->d_inode;
struct cifsTconInfo *tcon = tlink_tcon(cifs_file->tlink); struct cifs_tcon *tcon = tlink_tcon(cifs_file->tlink);
struct cifsInodeInfo *cifsi = CIFS_I(inode); struct cifsInodeInfo *cifsi = CIFS_I(inode);
struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
struct cifsLockInfo *li, *tmp; struct cifsLockInfo *li, *tmp;
@ -343,7 +343,7 @@ int cifs_open(struct inode *inode, struct file *file)
int xid; int xid;
__u32 oplock; __u32 oplock;
struct cifs_sb_info *cifs_sb; struct cifs_sb_info *cifs_sb;
struct cifsTconInfo *tcon; struct cifs_tcon *tcon;
struct tcon_link *tlink; struct tcon_link *tlink;
struct cifsFileInfo *pCifsFile = NULL; struct cifsFileInfo *pCifsFile = NULL;
char *full_path = NULL; char *full_path = NULL;
@ -457,7 +457,7 @@ static int cifs_reopen_file(struct cifsFileInfo *pCifsFile, bool can_flush)
int xid; int xid;
__u32 oplock; __u32 oplock;
struct cifs_sb_info *cifs_sb; struct cifs_sb_info *cifs_sb;
struct cifsTconInfo *tcon; struct cifs_tcon *tcon;
struct cifsInodeInfo *pCifsInode; struct cifsInodeInfo *pCifsInode;
struct inode *inode; struct inode *inode;
char *full_path = NULL; char *full_path = NULL;
@ -596,7 +596,7 @@ int cifs_closedir(struct inode *inode, struct file *file)
xid = GetXid(); xid = GetXid();
if (pCFileStruct) { if (pCFileStruct) {
struct cifsTconInfo *pTcon = tlink_tcon(pCFileStruct->tlink); struct cifs_tcon *pTcon = tlink_tcon(pCFileStruct->tlink);
cFYI(1, "Freeing private data in close dir"); cFYI(1, "Freeing private data in close dir");
spin_lock(&cifs_file_list_lock); spin_lock(&cifs_file_list_lock);
@ -653,7 +653,7 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock)
__u64 length; __u64 length;
bool wait_flag = false; bool wait_flag = false;
struct cifs_sb_info *cifs_sb; struct cifs_sb_info *cifs_sb;
struct cifsTconInfo *tcon; struct cifs_tcon *tcon;
__u16 netfid; __u16 netfid;
__u8 lockType = LOCKING_ANDX_LARGE_FILES; __u8 lockType = LOCKING_ANDX_LARGE_FILES;
bool posix_locking = 0; bool posix_locking = 0;
@ -865,7 +865,7 @@ static ssize_t cifs_write(struct cifsFileInfo *open_file, __u32 pid,
unsigned int bytes_written = 0; unsigned int bytes_written = 0;
unsigned int total_written; unsigned int total_written;
struct cifs_sb_info *cifs_sb; struct cifs_sb_info *cifs_sb;
struct cifsTconInfo *pTcon; struct cifs_tcon *pTcon;
int xid; int xid;
struct dentry *dentry = open_file->dentry; struct dentry *dentry = open_file->dentry;
struct cifsInodeInfo *cifsi = CIFS_I(dentry->d_inode); struct cifsInodeInfo *cifsi = CIFS_I(dentry->d_inode);
@ -1405,7 +1405,7 @@ int cifs_strict_fsync(struct file *file, int datasync)
{ {
int xid; int xid;
int rc = 0; int rc = 0;
struct cifsTconInfo *tcon; struct cifs_tcon *tcon;
struct cifsFileInfo *smbfile = file->private_data; struct cifsFileInfo *smbfile = file->private_data;
struct inode *inode = file->f_path.dentry->d_inode; struct inode *inode = file->f_path.dentry->d_inode;
struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
@ -1435,7 +1435,7 @@ int cifs_fsync(struct file *file, int datasync)
{ {
int xid; int xid;
int rc = 0; int rc = 0;
struct cifsTconInfo *tcon; struct cifs_tcon *tcon;
struct cifsFileInfo *smbfile = file->private_data; struct cifsFileInfo *smbfile = file->private_data;
struct cifs_sb_info *cifs_sb = CIFS_SB(file->f_path.dentry->d_sb); struct cifs_sb_info *cifs_sb = CIFS_SB(file->f_path.dentry->d_sb);
@ -1526,7 +1526,7 @@ cifs_iovec_write(struct file *file, const struct iovec *iov,
struct iov_iter it; struct iov_iter it;
struct inode *inode; struct inode *inode;
struct cifsFileInfo *open_file; struct cifsFileInfo *open_file;
struct cifsTconInfo *pTcon; struct cifs_tcon *pTcon;
struct cifs_sb_info *cifs_sb; struct cifs_sb_info *cifs_sb;
struct cifs_io_parms io_parms; struct cifs_io_parms io_parms;
int xid, rc; int xid, rc;
@ -1693,7 +1693,7 @@ cifs_iovec_read(struct file *file, const struct iovec *iov,
size_t len, cur_len; size_t len, cur_len;
int iov_offset = 0; int iov_offset = 0;
struct cifs_sb_info *cifs_sb; struct cifs_sb_info *cifs_sb;
struct cifsTconInfo *pTcon; struct cifs_tcon *pTcon;
struct cifsFileInfo *open_file; struct cifsFileInfo *open_file;
struct smb_com_read_rsp *pSMBr; struct smb_com_read_rsp *pSMBr;
struct cifs_io_parms io_parms; struct cifs_io_parms io_parms;
@ -1815,7 +1815,7 @@ static ssize_t cifs_read(struct file *file, char *read_data, size_t read_size,
unsigned int total_read; unsigned int total_read;
unsigned int current_read_size; unsigned int current_read_size;
struct cifs_sb_info *cifs_sb; struct cifs_sb_info *cifs_sb;
struct cifsTconInfo *pTcon; struct cifs_tcon *pTcon;
int xid; int xid;
char *current_offset; char *current_offset;
struct cifsFileInfo *open_file; struct cifsFileInfo *open_file;
@ -1998,7 +1998,7 @@ static int cifs_readpages(struct file *file, struct address_space *mapping,
loff_t offset; loff_t offset;
struct page *page; struct page *page;
struct cifs_sb_info *cifs_sb; struct cifs_sb_info *cifs_sb;
struct cifsTconInfo *pTcon; struct cifs_tcon *pTcon;
unsigned int bytes_read = 0; unsigned int bytes_read = 0;
unsigned int read_size, i; unsigned int read_size, i;
char *smb_read_data = NULL; char *smb_read_data = NULL;

View File

@ -40,7 +40,7 @@ void cifs_fscache_release_client_cookie(struct TCP_Server_Info *server)
server->fscache = NULL; server->fscache = NULL;
} }
void cifs_fscache_get_super_cookie(struct cifsTconInfo *tcon) void cifs_fscache_get_super_cookie(struct cifs_tcon *tcon)
{ {
struct TCP_Server_Info *server = tcon->ses->server; struct TCP_Server_Info *server = tcon->ses->server;
@ -51,7 +51,7 @@ void cifs_fscache_get_super_cookie(struct cifsTconInfo *tcon)
server->fscache, tcon->fscache); server->fscache, tcon->fscache);
} }
void cifs_fscache_release_super_cookie(struct cifsTconInfo *tcon) void cifs_fscache_release_super_cookie(struct cifs_tcon *tcon)
{ {
cFYI(1, "CIFS: releasing superblock cookie (0x%p)", tcon->fscache); cFYI(1, "CIFS: releasing superblock cookie (0x%p)", tcon->fscache);
fscache_relinquish_cookie(tcon->fscache, 0); fscache_relinquish_cookie(tcon->fscache, 0);
@ -62,7 +62,7 @@ static void cifs_fscache_enable_inode_cookie(struct inode *inode)
{ {
struct cifsInodeInfo *cifsi = CIFS_I(inode); struct cifsInodeInfo *cifsi = CIFS_I(inode);
struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
struct cifsTconInfo *tcon = cifs_sb_master_tcon(cifs_sb); struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb);
if (cifsi->fscache) if (cifsi->fscache)
return; return;

View File

@ -40,8 +40,8 @@ extern void cifs_fscache_unregister(void);
*/ */
extern void cifs_fscache_get_client_cookie(struct TCP_Server_Info *); extern void cifs_fscache_get_client_cookie(struct TCP_Server_Info *);
extern void cifs_fscache_release_client_cookie(struct TCP_Server_Info *); extern void cifs_fscache_release_client_cookie(struct TCP_Server_Info *);
extern void cifs_fscache_get_super_cookie(struct cifsTconInfo *); extern void cifs_fscache_get_super_cookie(struct cifs_tcon *);
extern void cifs_fscache_release_super_cookie(struct cifsTconInfo *); extern void cifs_fscache_release_super_cookie(struct cifs_tcon *);
extern void cifs_fscache_release_inode_cookie(struct inode *); extern void cifs_fscache_release_inode_cookie(struct inode *);
extern void cifs_fscache_set_inode_cookie(struct inode *, struct file *); extern void cifs_fscache_set_inode_cookie(struct inode *, struct file *);
@ -99,9 +99,9 @@ static inline void
cifs_fscache_get_client_cookie(struct TCP_Server_Info *server) {} cifs_fscache_get_client_cookie(struct TCP_Server_Info *server) {}
static inline void static inline void
cifs_fscache_release_client_cookie(struct TCP_Server_Info *server) {} cifs_fscache_release_client_cookie(struct TCP_Server_Info *server) {}
static inline void cifs_fscache_get_super_cookie(struct cifsTconInfo *tcon) {} static inline void cifs_fscache_get_super_cookie(struct cifs_tcon *tcon) {}
static inline void static inline void
cifs_fscache_release_super_cookie(struct cifsTconInfo *tcon) {} cifs_fscache_release_super_cookie(struct cifs_tcon *tcon) {}
static inline void cifs_fscache_release_inode_cookie(struct inode *inode) {} static inline void cifs_fscache_release_inode_cookie(struct inode *inode) {}
static inline void cifs_fscache_set_inode_cookie(struct inode *inode, static inline void cifs_fscache_set_inode_cookie(struct inode *inode,

View File

@ -295,7 +295,7 @@ int cifs_get_file_info_unix(struct file *filp)
struct inode *inode = filp->f_path.dentry->d_inode; struct inode *inode = filp->f_path.dentry->d_inode;
struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
struct cifsFileInfo *cfile = filp->private_data; struct cifsFileInfo *cfile = filp->private_data;
struct cifsTconInfo *tcon = tlink_tcon(cfile->tlink); struct cifs_tcon *tcon = tlink_tcon(cfile->tlink);
xid = GetXid(); xid = GetXid();
rc = CIFSSMBUnixQFileInfo(xid, tcon, cfile->netfid, &find_data); rc = CIFSSMBUnixQFileInfo(xid, tcon, cfile->netfid, &find_data);
@ -318,7 +318,7 @@ int cifs_get_inode_info_unix(struct inode **pinode,
int rc; int rc;
FILE_UNIX_BASIC_INFO find_data; FILE_UNIX_BASIC_INFO find_data;
struct cifs_fattr fattr; struct cifs_fattr fattr;
struct cifsTconInfo *tcon; struct cifs_tcon *tcon;
struct tcon_link *tlink; struct tcon_link *tlink;
struct cifs_sb_info *cifs_sb = CIFS_SB(sb); struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
@ -373,7 +373,7 @@ cifs_sfu_type(struct cifs_fattr *fattr, const unsigned char *path,
int oplock = 0; int oplock = 0;
__u16 netfid; __u16 netfid;
struct tcon_link *tlink; struct tcon_link *tlink;
struct cifsTconInfo *tcon; struct cifs_tcon *tcon;
struct cifs_io_parms io_parms; struct cifs_io_parms io_parms;
char buf[24]; char buf[24];
unsigned int bytes_read; unsigned int bytes_read;
@ -473,7 +473,7 @@ static int cifs_sfu_mode(struct cifs_fattr *fattr, const unsigned char *path,
char ea_value[4]; char ea_value[4];
__u32 mode; __u32 mode;
struct tcon_link *tlink; struct tcon_link *tlink;
struct cifsTconInfo *tcon; struct cifs_tcon *tcon;
tlink = cifs_sb_tlink(cifs_sb); tlink = cifs_sb_tlink(cifs_sb);
if (IS_ERR(tlink)) if (IS_ERR(tlink))
@ -507,7 +507,7 @@ static void
cifs_all_info_to_fattr(struct cifs_fattr *fattr, FILE_ALL_INFO *info, cifs_all_info_to_fattr(struct cifs_fattr *fattr, FILE_ALL_INFO *info,
struct cifs_sb_info *cifs_sb, bool adjust_tz) struct cifs_sb_info *cifs_sb, bool adjust_tz)
{ {
struct cifsTconInfo *tcon = cifs_sb_master_tcon(cifs_sb); struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb);
memset(fattr, 0, sizeof(*fattr)); memset(fattr, 0, sizeof(*fattr));
fattr->cf_cifsattrs = le32_to_cpu(info->Attributes); fattr->cf_cifsattrs = le32_to_cpu(info->Attributes);
@ -558,7 +558,7 @@ int cifs_get_file_info(struct file *filp)
struct inode *inode = filp->f_path.dentry->d_inode; struct inode *inode = filp->f_path.dentry->d_inode;
struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
struct cifsFileInfo *cfile = filp->private_data; struct cifsFileInfo *cfile = filp->private_data;
struct cifsTconInfo *tcon = tlink_tcon(cfile->tlink); struct cifs_tcon *tcon = tlink_tcon(cfile->tlink);
xid = GetXid(); xid = GetXid();
rc = CIFSSMBQFileInfo(xid, tcon, cfile->netfid, &find_data); rc = CIFSSMBQFileInfo(xid, tcon, cfile->netfid, &find_data);
@ -595,7 +595,7 @@ int cifs_get_inode_info(struct inode **pinode,
struct super_block *sb, int xid, const __u16 *pfid) struct super_block *sb, int xid, const __u16 *pfid)
{ {
int rc = 0, tmprc; int rc = 0, tmprc;
struct cifsTconInfo *pTcon; struct cifs_tcon *pTcon;
struct tcon_link *tlink; struct tcon_link *tlink;
struct cifs_sb_info *cifs_sb = CIFS_SB(sb); struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
char *buf = NULL; char *buf = NULL;
@ -741,7 +741,7 @@ static const struct inode_operations cifs_ipc_inode_ops = {
}; };
char *cifs_build_path_to_root(struct smb_vol *vol, struct cifs_sb_info *cifs_sb, char *cifs_build_path_to_root(struct smb_vol *vol, struct cifs_sb_info *cifs_sb,
struct cifsTconInfo *tcon) struct cifs_tcon *tcon)
{ {
int pplen = vol->prepath ? strlen(vol->prepath) : 0; int pplen = vol->prepath ? strlen(vol->prepath) : 0;
int dfsplen; int dfsplen;
@ -889,7 +889,7 @@ struct inode *cifs_root_iget(struct super_block *sb)
struct cifs_sb_info *cifs_sb = CIFS_SB(sb); struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
struct inode *inode = NULL; struct inode *inode = NULL;
long rc; long rc;
struct cifsTconInfo *tcon = cifs_sb_master_tcon(cifs_sb); struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb);
xid = GetXid(); xid = GetXid();
if (tcon->unix_ext) if (tcon->unix_ext)
@ -941,7 +941,7 @@ cifs_set_file_info(struct inode *inode, struct iattr *attrs, int xid,
struct cifsInodeInfo *cifsInode = CIFS_I(inode); struct cifsInodeInfo *cifsInode = CIFS_I(inode);
struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
struct tcon_link *tlink = NULL; struct tcon_link *tlink = NULL;
struct cifsTconInfo *pTcon; struct cifs_tcon *pTcon;
FILE_BASIC_INFO info_buf; FILE_BASIC_INFO info_buf;
if (attrs == NULL) if (attrs == NULL)
@ -1059,7 +1059,7 @@ cifs_rename_pending_delete(char *full_path, struct dentry *dentry, int xid)
struct cifsInodeInfo *cifsInode = CIFS_I(inode); struct cifsInodeInfo *cifsInode = CIFS_I(inode);
struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
struct tcon_link *tlink; struct tcon_link *tlink;
struct cifsTconInfo *tcon; struct cifs_tcon *tcon;
__u32 dosattr, origattr; __u32 dosattr, origattr;
FILE_BASIC_INFO *info_buf = NULL; FILE_BASIC_INFO *info_buf = NULL;
@ -1177,7 +1177,7 @@ int cifs_unlink(struct inode *dir, struct dentry *dentry)
struct super_block *sb = dir->i_sb; struct super_block *sb = dir->i_sb;
struct cifs_sb_info *cifs_sb = CIFS_SB(sb); struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
struct tcon_link *tlink; struct tcon_link *tlink;
struct cifsTconInfo *tcon; struct cifs_tcon *tcon;
struct iattr *attrs = NULL; struct iattr *attrs = NULL;
__u32 dosattr = 0, origattr = 0; __u32 dosattr = 0, origattr = 0;
@ -1275,7 +1275,7 @@ int cifs_mkdir(struct inode *inode, struct dentry *direntry, int mode)
int xid; int xid;
struct cifs_sb_info *cifs_sb; struct cifs_sb_info *cifs_sb;
struct tcon_link *tlink; struct tcon_link *tlink;
struct cifsTconInfo *pTcon; struct cifs_tcon *pTcon;
char *full_path = NULL; char *full_path = NULL;
struct inode *newinode = NULL; struct inode *newinode = NULL;
struct cifs_fattr fattr; struct cifs_fattr fattr;
@ -1453,7 +1453,7 @@ int cifs_rmdir(struct inode *inode, struct dentry *direntry)
int xid; int xid;
struct cifs_sb_info *cifs_sb; struct cifs_sb_info *cifs_sb;
struct tcon_link *tlink; struct tcon_link *tlink;
struct cifsTconInfo *pTcon; struct cifs_tcon *pTcon;
char *full_path = NULL; char *full_path = NULL;
struct cifsInodeInfo *cifsInode; struct cifsInodeInfo *cifsInode;
@ -1510,7 +1510,7 @@ cifs_do_rename(int xid, struct dentry *from_dentry, const char *fromPath,
{ {
struct cifs_sb_info *cifs_sb = CIFS_SB(from_dentry->d_sb); struct cifs_sb_info *cifs_sb = CIFS_SB(from_dentry->d_sb);
struct tcon_link *tlink; struct tcon_link *tlink;
struct cifsTconInfo *pTcon; struct cifs_tcon *pTcon;
__u16 srcfid; __u16 srcfid;
int oplock, rc; int oplock, rc;
@ -1562,7 +1562,7 @@ int cifs_rename(struct inode *source_dir, struct dentry *source_dentry,
char *toName = NULL; char *toName = NULL;
struct cifs_sb_info *cifs_sb; struct cifs_sb_info *cifs_sb;
struct tcon_link *tlink; struct tcon_link *tlink;
struct cifsTconInfo *tcon; struct cifs_tcon *tcon;
FILE_UNIX_BASIC_INFO *info_buf_source = NULL; FILE_UNIX_BASIC_INFO *info_buf_source = NULL;
FILE_UNIX_BASIC_INFO *info_buf_target; FILE_UNIX_BASIC_INFO *info_buf_target;
int xid, rc, tmprc; int xid, rc, tmprc;
@ -1792,7 +1792,7 @@ int cifs_getattr(struct vfsmount *mnt, struct dentry *dentry,
struct kstat *stat) struct kstat *stat)
{ {
struct cifs_sb_info *cifs_sb = CIFS_SB(dentry->d_sb); struct cifs_sb_info *cifs_sb = CIFS_SB(dentry->d_sb);
struct cifsTconInfo *tcon = cifs_sb_master_tcon(cifs_sb); struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb);
struct inode *inode = dentry->d_inode; struct inode *inode = dentry->d_inode;
int rc; int rc;
@ -1870,7 +1870,7 @@ cifs_set_file_size(struct inode *inode, struct iattr *attrs,
struct cifsInodeInfo *cifsInode = CIFS_I(inode); struct cifsInodeInfo *cifsInode = CIFS_I(inode);
struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
struct tcon_link *tlink = NULL; struct tcon_link *tlink = NULL;
struct cifsTconInfo *pTcon = NULL; struct cifs_tcon *pTcon = NULL;
struct cifs_io_parms io_parms; struct cifs_io_parms io_parms;
/* /*
@ -1971,7 +1971,7 @@ cifs_setattr_unix(struct dentry *direntry, struct iattr *attrs)
struct cifsInodeInfo *cifsInode = CIFS_I(inode); struct cifsInodeInfo *cifsInode = CIFS_I(inode);
struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
struct tcon_link *tlink; struct tcon_link *tlink;
struct cifsTconInfo *pTcon; struct cifs_tcon *pTcon;
struct cifs_unix_set_info_args *args = NULL; struct cifs_unix_set_info_args *args = NULL;
struct cifsFileInfo *open_file; struct cifsFileInfo *open_file;
@ -2257,7 +2257,7 @@ cifs_setattr(struct dentry *direntry, struct iattr *attrs)
{ {
struct inode *inode = direntry->d_inode; struct inode *inode = direntry->d_inode;
struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
struct cifsTconInfo *pTcon = cifs_sb_master_tcon(cifs_sb); struct cifs_tcon *pTcon = cifs_sb_master_tcon(cifs_sb);
if (pTcon->unix_ext) if (pTcon->unix_ext)
return cifs_setattr_unix(direntry, attrs); return cifs_setattr_unix(direntry, attrs);

View File

@ -38,7 +38,7 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
struct cifs_sb_info *cifs_sb; struct cifs_sb_info *cifs_sb;
#ifdef CONFIG_CIFS_POSIX #ifdef CONFIG_CIFS_POSIX
struct cifsFileInfo *pSMBFile = filep->private_data; struct cifsFileInfo *pSMBFile = filep->private_data;
struct cifsTconInfo *tcon; struct cifs_tcon *tcon;
__u64 ExtAttrBits = 0; __u64 ExtAttrBits = 0;
__u64 ExtAttrMask = 0; __u64 ExtAttrMask = 0;
__u64 caps; __u64 caps;

View File

@ -175,7 +175,7 @@ CIFSFormatMFSymlink(u8 *buf, unsigned int buf_len, const char *link_str)
} }
static int static int
CIFSCreateMFSymLink(const int xid, struct cifsTconInfo *tcon, CIFSCreateMFSymLink(const int xid, struct cifs_tcon *tcon,
const char *fromName, const char *toName, const char *fromName, const char *toName,
const struct nls_table *nls_codepage, int remap) const struct nls_table *nls_codepage, int remap)
{ {
@ -223,7 +223,7 @@ CIFSCreateMFSymLink(const int xid, struct cifsTconInfo *tcon,
} }
static int static int
CIFSQueryMFSymLink(const int xid, struct cifsTconInfo *tcon, CIFSQueryMFSymLink(const int xid, struct cifs_tcon *tcon,
const unsigned char *searchName, char **symlinkinfo, const unsigned char *searchName, char **symlinkinfo,
const struct nls_table *nls_codepage, int remap) const struct nls_table *nls_codepage, int remap)
{ {
@ -298,7 +298,7 @@ CIFSCheckMFSymlink(struct cifs_fattr *fattr,
int oplock = 0; int oplock = 0;
__u16 netfid = 0; __u16 netfid = 0;
struct tcon_link *tlink; struct tcon_link *tlink;
struct cifsTconInfo *pTcon; struct cifs_tcon *pTcon;
struct cifs_io_parms io_parms; struct cifs_io_parms io_parms;
u8 *buf; u8 *buf;
char *pbuf; char *pbuf;
@ -380,7 +380,7 @@ cifs_hardlink(struct dentry *old_file, struct inode *inode,
char *toName = NULL; char *toName = NULL;
struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
struct tcon_link *tlink; struct tcon_link *tlink;
struct cifsTconInfo *pTcon; struct cifs_tcon *pTcon;
struct cifsInodeInfo *cifsInode; struct cifsInodeInfo *cifsInode;
tlink = cifs_sb_tlink(cifs_sb); tlink = cifs_sb_tlink(cifs_sb);
@ -455,7 +455,7 @@ cifs_follow_link(struct dentry *direntry, struct nameidata *nd)
char *target_path = NULL; char *target_path = NULL;
struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
struct tcon_link *tlink = NULL; struct tcon_link *tlink = NULL;
struct cifsTconInfo *tcon; struct cifs_tcon *tcon;
xid = GetXid(); xid = GetXid();
@ -528,7 +528,7 @@ cifs_symlink(struct inode *inode, struct dentry *direntry, const char *symname)
int xid; int xid;
struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
struct tcon_link *tlink; struct tcon_link *tlink;
struct cifsTconInfo *pTcon; struct cifs_tcon *pTcon;
char *full_path = NULL; char *full_path = NULL;
struct inode *newinode = NULL; struct inode *newinode = NULL;

View File

@ -67,12 +67,12 @@ _FreeXid(unsigned int xid)
spin_unlock(&GlobalMid_Lock); spin_unlock(&GlobalMid_Lock);
} }
struct cifsSesInfo * struct cifs_ses *
sesInfoAlloc(void) sesInfoAlloc(void)
{ {
struct cifsSesInfo *ret_buf; struct cifs_ses *ret_buf;
ret_buf = kzalloc(sizeof(struct cifsSesInfo), GFP_KERNEL); ret_buf = kzalloc(sizeof(struct cifs_ses), GFP_KERNEL);
if (ret_buf) { if (ret_buf) {
atomic_inc(&sesInfoAllocCount); atomic_inc(&sesInfoAllocCount);
ret_buf->status = CifsNew; ret_buf->status = CifsNew;
@ -85,7 +85,7 @@ sesInfoAlloc(void)
} }
void void
sesInfoFree(struct cifsSesInfo *buf_to_free) sesInfoFree(struct cifs_ses *buf_to_free)
{ {
if (buf_to_free == NULL) { if (buf_to_free == NULL) {
cFYI(1, "Null buffer passed to sesInfoFree"); cFYI(1, "Null buffer passed to sesInfoFree");
@ -105,11 +105,11 @@ sesInfoFree(struct cifsSesInfo *buf_to_free)
kfree(buf_to_free); kfree(buf_to_free);
} }
struct cifsTconInfo * struct cifs_tcon *
tconInfoAlloc(void) tconInfoAlloc(void)
{ {
struct cifsTconInfo *ret_buf; struct cifs_tcon *ret_buf;
ret_buf = kzalloc(sizeof(struct cifsTconInfo), GFP_KERNEL); ret_buf = kzalloc(sizeof(struct cifs_tcon), GFP_KERNEL);
if (ret_buf) { if (ret_buf) {
atomic_inc(&tconInfoAllocCount); atomic_inc(&tconInfoAllocCount);
ret_buf->tidStatus = CifsNew; ret_buf->tidStatus = CifsNew;
@ -124,7 +124,7 @@ tconInfoAlloc(void)
} }
void void
tconInfoFree(struct cifsTconInfo *buf_to_free) tconInfoFree(struct cifs_tcon *buf_to_free)
{ {
if (buf_to_free == NULL) { if (buf_to_free == NULL) {
cFYI(1, "Null buffer passed to tconInfoFree"); cFYI(1, "Null buffer passed to tconInfoFree");
@ -295,11 +295,11 @@ __u16 GetNextMid(struct TCP_Server_Info *server)
case it is responsbility of caller to set the mid */ case it is responsbility of caller to set the mid */
void void
header_assemble(struct smb_hdr *buffer, char smb_command /* command */ , header_assemble(struct smb_hdr *buffer, char smb_command /* command */ ,
const struct cifsTconInfo *treeCon, int word_count const struct cifs_tcon *treeCon, int word_count
/* length of fixed section (word count) in two byte units */) /* length of fixed section (word count) in two byte units */)
{ {
struct list_head *temp_item; struct list_head *temp_item;
struct cifsSesInfo *ses; struct cifs_ses *ses;
char *temp = (char *) buffer; char *temp = (char *) buffer;
memset(temp, 0, 256); /* bigger than MAX_CIFS_HDR_SIZE */ memset(temp, 0, 256); /* bigger than MAX_CIFS_HDR_SIZE */
@ -359,7 +359,7 @@ header_assemble(struct smb_hdr *buffer, char smb_command /* command */ ,
"did not match tcon uid"); "did not match tcon uid");
spin_lock(&cifs_tcp_ses_lock); spin_lock(&cifs_tcp_ses_lock);
list_for_each(temp_item, &treeCon->ses->server->smb_ses_list) { list_for_each(temp_item, &treeCon->ses->server->smb_ses_list) {
ses = list_entry(temp_item, struct cifsSesInfo, smb_ses_list); ses = list_entry(temp_item, struct cifs_ses, smb_ses_list);
if (ses->linux_uid == current_fsuid()) { if (ses->linux_uid == current_fsuid()) {
if (ses->server == treeCon->ses->server) { if (ses->server == treeCon->ses->server) {
cFYI(1, "found matching uid substitute right smb_uid"); cFYI(1, "found matching uid substitute right smb_uid");
@ -380,7 +380,7 @@ header_assemble(struct smb_hdr *buffer, char smb_command /* command */ ,
if (treeCon->nocase) if (treeCon->nocase)
buffer->Flags |= SMBFLG_CASELESS; buffer->Flags |= SMBFLG_CASELESS;
if ((treeCon->ses) && (treeCon->ses->server)) if ((treeCon->ses) && (treeCon->ses->server))
if (treeCon->ses->server->secMode & if (treeCon->ses->server->sec_mode &
(SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED))
buffer->Flags2 |= SMBFLG2_SECURITY_SIGNATURE; buffer->Flags2 |= SMBFLG2_SECURITY_SIGNATURE;
} }
@ -507,8 +507,8 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv)
{ {
struct smb_com_lock_req *pSMB = (struct smb_com_lock_req *)buf; struct smb_com_lock_req *pSMB = (struct smb_com_lock_req *)buf;
struct list_head *tmp, *tmp1, *tmp2; struct list_head *tmp, *tmp1, *tmp2;
struct cifsSesInfo *ses; struct cifs_ses *ses;
struct cifsTconInfo *tcon; struct cifs_tcon *tcon;
struct cifsInodeInfo *pCifsInode; struct cifsInodeInfo *pCifsInode;
struct cifsFileInfo *netfile; struct cifsFileInfo *netfile;
@ -566,9 +566,9 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv)
/* look up tcon based on tid & uid */ /* look up tcon based on tid & uid */
spin_lock(&cifs_tcp_ses_lock); spin_lock(&cifs_tcp_ses_lock);
list_for_each(tmp, &srv->smb_ses_list) { list_for_each(tmp, &srv->smb_ses_list) {
ses = list_entry(tmp, struct cifsSesInfo, smb_ses_list); ses = list_entry(tmp, struct cifs_ses, smb_ses_list);
list_for_each(tmp1, &ses->tcon_list) { list_for_each(tmp1, &ses->tcon_list) {
tcon = list_entry(tmp1, struct cifsTconInfo, tcon_list); tcon = list_entry(tmp1, struct cifs_tcon, tcon_list);
if (tcon->tid != buf->Tid) if (tcon->tid != buf->Tid)
continue; continue;

View File

@ -195,7 +195,7 @@ int get_symlink_reparse_path(char *full_path, struct cifs_sb_info *cifs_sb,
int len; int len;
int oplock = 0; int oplock = 0;
int rc; int rc;
struct cifsTconInfo *ptcon = cifs_sb_tcon(cifs_sb); struct cifs_tcon *ptcon = cifs_sb_tcon(cifs_sb);
char *tmpbuffer; char *tmpbuffer;
rc = CIFSSMBOpen(xid, ptcon, full_path, FILE_OPEN, GENERIC_READ, rc = CIFSSMBOpen(xid, ptcon, full_path, FILE_OPEN, GENERIC_READ,
@ -223,7 +223,7 @@ static int initiate_cifs_search(const int xid, struct file *file)
struct cifsFileInfo *cifsFile; struct cifsFileInfo *cifsFile;
struct cifs_sb_info *cifs_sb = CIFS_SB(file->f_path.dentry->d_sb); struct cifs_sb_info *cifs_sb = CIFS_SB(file->f_path.dentry->d_sb);
struct tcon_link *tlink = NULL; struct tcon_link *tlink = NULL;
struct cifsTconInfo *pTcon; struct cifs_tcon *pTcon;
if (file->private_data == NULL) { if (file->private_data == NULL) {
tlink = cifs_sb_tlink(cifs_sb); tlink = cifs_sb_tlink(cifs_sb);
@ -496,7 +496,7 @@ static int cifs_save_resume_key(const char *current_entry,
assume that they are located in the findfirst return buffer.*/ assume that they are located in the findfirst return buffer.*/
/* We start counting in the buffer with entry 2 and increment for every /* We start counting in the buffer with entry 2 and increment for every
entry (do not increment for . or .. entry) */ entry (do not increment for . or .. entry) */
static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon, static int find_cifs_entry(const int xid, struct cifs_tcon *pTcon,
struct file *file, char **ppCurrentEntry, int *num_to_ret) struct file *file, char **ppCurrentEntry, int *num_to_ret)
{ {
int rc = 0; int rc = 0;
@ -764,7 +764,7 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir)
{ {
int rc = 0; int rc = 0;
int xid, i; int xid, i;
struct cifsTconInfo *pTcon; struct cifs_tcon *pTcon;
struct cifsFileInfo *cifsFile = NULL; struct cifsFileInfo *cifsFile = NULL;
char *current_entry; char *current_entry;
int num_to_fill = 0; int num_to_fill = 0;

View File

@ -37,13 +37,13 @@
* the socket has been reestablished (so we know whether to use vc 0). * the socket has been reestablished (so we know whether to use vc 0).
* Called while holding the cifs_tcp_ses_lock, so do not block * Called while holding the cifs_tcp_ses_lock, so do not block
*/ */
static bool is_first_ses_reconnect(struct cifsSesInfo *ses) static bool is_first_ses_reconnect(struct cifs_ses *ses)
{ {
struct list_head *tmp; struct list_head *tmp;
struct cifsSesInfo *tmp_ses; struct cifs_ses *tmp_ses;
list_for_each(tmp, &ses->server->smb_ses_list) { list_for_each(tmp, &ses->server->smb_ses_list) {
tmp_ses = list_entry(tmp, struct cifsSesInfo, tmp_ses = list_entry(tmp, struct cifs_ses,
smb_ses_list); smb_ses_list);
if (tmp_ses->need_reconnect == false) if (tmp_ses->need_reconnect == false)
return false; return false;
@ -61,11 +61,11 @@ static bool is_first_ses_reconnect(struct cifsSesInfo *ses)
* any vc but zero (some servers reset the connection on vcnum zero) * any vc but zero (some servers reset the connection on vcnum zero)
* *
*/ */
static __le16 get_next_vcnum(struct cifsSesInfo *ses) static __le16 get_next_vcnum(struct cifs_ses *ses)
{ {
__u16 vcnum = 0; __u16 vcnum = 0;
struct list_head *tmp; struct list_head *tmp;
struct cifsSesInfo *tmp_ses; struct cifs_ses *tmp_ses;
__u16 max_vcs = ses->server->max_vcs; __u16 max_vcs = ses->server->max_vcs;
__u16 i; __u16 i;
int free_vc_found = 0; int free_vc_found = 0;
@ -87,7 +87,7 @@ static __le16 get_next_vcnum(struct cifsSesInfo *ses)
free_vc_found = 1; free_vc_found = 1;
list_for_each(tmp, &ses->server->smb_ses_list) { list_for_each(tmp, &ses->server->smb_ses_list) {
tmp_ses = list_entry(tmp, struct cifsSesInfo, tmp_ses = list_entry(tmp, struct cifs_ses,
smb_ses_list); smb_ses_list);
if (tmp_ses->vcnum == i) { if (tmp_ses->vcnum == i) {
free_vc_found = 0; free_vc_found = 0;
@ -114,7 +114,7 @@ get_vc_num_exit:
return cpu_to_le16(vcnum); return cpu_to_le16(vcnum);
} }
static __u32 cifs_ssetup_hdr(struct cifsSesInfo *ses, SESSION_SETUP_ANDX *pSMB) static __u32 cifs_ssetup_hdr(struct cifs_ses *ses, SESSION_SETUP_ANDX *pSMB)
{ {
__u32 capabilities = 0; __u32 capabilities = 0;
@ -136,7 +136,7 @@ static __u32 cifs_ssetup_hdr(struct cifsSesInfo *ses, SESSION_SETUP_ANDX *pSMB)
capabilities = CAP_LARGE_FILES | CAP_NT_SMBS | CAP_LEVEL_II_OPLOCKS | capabilities = CAP_LARGE_FILES | CAP_NT_SMBS | CAP_LEVEL_II_OPLOCKS |
CAP_LARGE_WRITE_X | CAP_LARGE_READ_X; CAP_LARGE_WRITE_X | CAP_LARGE_READ_X;
if (ses->server->secMode & if (ses->server->sec_mode &
(SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED))
pSMB->req.hdr.Flags2 |= SMBFLG2_SECURITY_SIGNATURE; pSMB->req.hdr.Flags2 |= SMBFLG2_SECURITY_SIGNATURE;
@ -181,7 +181,7 @@ unicode_oslm_strings(char **pbcc_area, const struct nls_table *nls_cp)
*pbcc_area = bcc_ptr; *pbcc_area = bcc_ptr;
} }
static void unicode_domain_string(char **pbcc_area, struct cifsSesInfo *ses, static void unicode_domain_string(char **pbcc_area, struct cifs_ses *ses,
const struct nls_table *nls_cp) const struct nls_table *nls_cp)
{ {
char *bcc_ptr = *pbcc_area; char *bcc_ptr = *pbcc_area;
@ -204,7 +204,7 @@ static void unicode_domain_string(char **pbcc_area, struct cifsSesInfo *ses,
} }
static void unicode_ssetup_strings(char **pbcc_area, struct cifsSesInfo *ses, static void unicode_ssetup_strings(char **pbcc_area, struct cifs_ses *ses,
const struct nls_table *nls_cp) const struct nls_table *nls_cp)
{ {
char *bcc_ptr = *pbcc_area; char *bcc_ptr = *pbcc_area;
@ -236,7 +236,7 @@ static void unicode_ssetup_strings(char **pbcc_area, struct cifsSesInfo *ses,
*pbcc_area = bcc_ptr; *pbcc_area = bcc_ptr;
} }
static void ascii_ssetup_strings(char **pbcc_area, struct cifsSesInfo *ses, static void ascii_ssetup_strings(char **pbcc_area, struct cifs_ses *ses,
const struct nls_table *nls_cp) const struct nls_table *nls_cp)
{ {
char *bcc_ptr = *pbcc_area; char *bcc_ptr = *pbcc_area;
@ -276,7 +276,7 @@ static void ascii_ssetup_strings(char **pbcc_area, struct cifsSesInfo *ses,
} }
static void static void
decode_unicode_ssetup(char **pbcc_area, int bleft, struct cifsSesInfo *ses, decode_unicode_ssetup(char **pbcc_area, int bleft, struct cifs_ses *ses,
const struct nls_table *nls_cp) const struct nls_table *nls_cp)
{ {
int len; int len;
@ -310,7 +310,7 @@ decode_unicode_ssetup(char **pbcc_area, int bleft, struct cifsSesInfo *ses,
} }
static int decode_ascii_ssetup(char **pbcc_area, __u16 bleft, static int decode_ascii_ssetup(char **pbcc_area, __u16 bleft,
struct cifsSesInfo *ses, struct cifs_ses *ses,
const struct nls_table *nls_cp) const struct nls_table *nls_cp)
{ {
int rc = 0; int rc = 0;
@ -364,7 +364,7 @@ static int decode_ascii_ssetup(char **pbcc_area, __u16 bleft,
} }
static int decode_ntlmssp_challenge(char *bcc_ptr, int blob_len, static int decode_ntlmssp_challenge(char *bcc_ptr, int blob_len,
struct cifsSesInfo *ses) struct cifs_ses *ses)
{ {
unsigned int tioffset; /* challenge message target info area */ unsigned int tioffset; /* challenge message target info area */
unsigned int tilen; /* challenge message target info area length */ unsigned int tilen; /* challenge message target info area length */
@ -411,7 +411,7 @@ static int decode_ntlmssp_challenge(char *bcc_ptr, int blob_len,
/* We do not malloc the blob, it is passed in pbuffer, because /* We do not malloc the blob, it is passed in pbuffer, because
it is fixed size, and small, making this approach cleaner */ it is fixed size, and small, making this approach cleaner */
static void build_ntlmssp_negotiate_blob(unsigned char *pbuffer, static void build_ntlmssp_negotiate_blob(unsigned char *pbuffer,
struct cifsSesInfo *ses) struct cifs_ses *ses)
{ {
NEGOTIATE_MESSAGE *sec_blob = (NEGOTIATE_MESSAGE *)pbuffer; NEGOTIATE_MESSAGE *sec_blob = (NEGOTIATE_MESSAGE *)pbuffer;
__u32 flags; __u32 flags;
@ -424,7 +424,7 @@ static void build_ntlmssp_negotiate_blob(unsigned char *pbuffer,
flags = NTLMSSP_NEGOTIATE_56 | NTLMSSP_REQUEST_TARGET | flags = NTLMSSP_NEGOTIATE_56 | NTLMSSP_REQUEST_TARGET |
NTLMSSP_NEGOTIATE_128 | NTLMSSP_NEGOTIATE_UNICODE | NTLMSSP_NEGOTIATE_128 | NTLMSSP_NEGOTIATE_UNICODE |
NTLMSSP_NEGOTIATE_NTLM | NTLMSSP_NEGOTIATE_EXTENDED_SEC; NTLMSSP_NEGOTIATE_NTLM | NTLMSSP_NEGOTIATE_EXTENDED_SEC;
if (ses->server->secMode & if (ses->server->sec_mode &
(SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) { (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) {
flags |= NTLMSSP_NEGOTIATE_SIGN; flags |= NTLMSSP_NEGOTIATE_SIGN;
if (!ses->server->session_estab) if (!ses->server->session_estab)
@ -449,7 +449,7 @@ static void build_ntlmssp_negotiate_blob(unsigned char *pbuffer,
This function returns the length of the data in the blob */ This function returns the length of the data in the blob */
static int build_ntlmssp_auth_blob(unsigned char *pbuffer, static int build_ntlmssp_auth_blob(unsigned char *pbuffer,
u16 *buflen, u16 *buflen,
struct cifsSesInfo *ses, struct cifs_ses *ses,
const struct nls_table *nls_cp) const struct nls_table *nls_cp)
{ {
int rc; int rc;
@ -464,10 +464,10 @@ static int build_ntlmssp_auth_blob(unsigned char *pbuffer,
NTLMSSP_REQUEST_TARGET | NTLMSSP_NEGOTIATE_TARGET_INFO | NTLMSSP_REQUEST_TARGET | NTLMSSP_NEGOTIATE_TARGET_INFO |
NTLMSSP_NEGOTIATE_128 | NTLMSSP_NEGOTIATE_UNICODE | NTLMSSP_NEGOTIATE_128 | NTLMSSP_NEGOTIATE_UNICODE |
NTLMSSP_NEGOTIATE_NTLM | NTLMSSP_NEGOTIATE_EXTENDED_SEC; NTLMSSP_NEGOTIATE_NTLM | NTLMSSP_NEGOTIATE_EXTENDED_SEC;
if (ses->server->secMode & if (ses->server->sec_mode &
(SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED))
flags |= NTLMSSP_NEGOTIATE_SIGN; flags |= NTLMSSP_NEGOTIATE_SIGN;
if (ses->server->secMode & SECMODE_SIGN_REQUIRED) if (ses->server->sec_mode & SECMODE_SIGN_REQUIRED)
flags |= NTLMSSP_NEGOTIATE_ALWAYS_SIGN; flags |= NTLMSSP_NEGOTIATE_ALWAYS_SIGN;
tmp = pbuffer + sizeof(AUTHENTICATE_MESSAGE); tmp = pbuffer + sizeof(AUTHENTICATE_MESSAGE);
@ -551,7 +551,7 @@ setup_ntlmv2_ret:
} }
int int
CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, CIFS_SessSetup(unsigned int xid, struct cifs_ses *ses,
const struct nls_table *nls_cp) const struct nls_table *nls_cp)
{ {
int rc = 0; int rc = 0;
@ -657,7 +657,7 @@ ssetup_ntlmssp_authenticate:
*/ */
rc = calc_lanman_hash(ses->password, ses->server->cryptkey, rc = calc_lanman_hash(ses->password, ses->server->cryptkey,
ses->server->secMode & SECMODE_PW_ENCRYPT ? ses->server->sec_mode & SECMODE_PW_ENCRYPT ?
true : false, lnm_session_key); true : false, lnm_session_key);
ses->flags |= CIFS_SES_LANMAN; ses->flags |= CIFS_SES_LANMAN;

View File

@ -295,7 +295,7 @@ static int wait_for_free_request(struct TCP_Server_Info *server,
return 0; return 0;
} }
static int allocate_mid(struct cifsSesInfo *ses, struct smb_hdr *in_buf, static int allocate_mid(struct cifs_ses *ses, struct smb_hdr *in_buf,
struct mid_q_entry **ppmidQ) struct mid_q_entry **ppmidQ)
{ {
if (ses->server->tcpStatus == CifsExiting) { if (ses->server->tcpStatus == CifsExiting) {
@ -355,7 +355,7 @@ cifs_call_async(struct TCP_Server_Info *server, struct kvec *iov,
return rc; return rc;
/* enable signing if server requires it */ /* enable signing if server requires it */
if (server->secMode & (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) if (server->sec_mode & (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED))
hdr->Flags2 |= SMBFLG2_SECURITY_SIGNATURE; hdr->Flags2 |= SMBFLG2_SECURITY_SIGNATURE;
mutex_lock(&server->srv_mutex); mutex_lock(&server->srv_mutex);
@ -409,7 +409,7 @@ out_err:
* *
*/ */
int int
SendReceiveNoRsp(const unsigned int xid, struct cifsSesInfo *ses, SendReceiveNoRsp(const unsigned int xid, struct cifs_ses *ses,
struct smb_hdr *in_buf, int flags) struct smb_hdr *in_buf, int flags)
{ {
int rc; int rc;
@ -504,7 +504,7 @@ cifs_check_receive(struct mid_q_entry *mid, struct TCP_Server_Info *server,
min_t(u32, 92, be32_to_cpu(mid->resp_buf->smb_buf_length))); min_t(u32, 92, be32_to_cpu(mid->resp_buf->smb_buf_length)));
/* convert the length into a more usable form */ /* convert the length into a more usable form */
if (server->secMode & (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) { if (server->sec_mode & (SECMODE_SIGN_REQUIRED | SECMODE_SIGN_ENABLED)) {
/* FIXME: add code to kill session */ /* FIXME: add code to kill session */
if (cifs_verify_signature(mid->resp_buf, server, if (cifs_verify_signature(mid->resp_buf, server,
mid->sequence_number + 1) != 0) mid->sequence_number + 1) != 0)
@ -516,7 +516,7 @@ cifs_check_receive(struct mid_q_entry *mid, struct TCP_Server_Info *server,
} }
int int
SendReceive2(const unsigned int xid, struct cifsSesInfo *ses, SendReceive2(const unsigned int xid, struct cifs_ses *ses,
struct kvec *iov, int n_vec, int *pRespBufType /* ret */, struct kvec *iov, int n_vec, int *pRespBufType /* ret */,
const int flags) const int flags)
{ {
@ -645,7 +645,7 @@ out:
} }
int int
SendReceive(const unsigned int xid, struct cifsSesInfo *ses, SendReceive(const unsigned int xid, struct cifs_ses *ses,
struct smb_hdr *in_buf, struct smb_hdr *out_buf, struct smb_hdr *in_buf, struct smb_hdr *out_buf,
int *pbytes_returned, const int long_op) int *pbytes_returned, const int long_op)
{ {
@ -761,12 +761,12 @@ out:
blocking lock to return. */ blocking lock to return. */
static int static int
send_lock_cancel(const unsigned int xid, struct cifsTconInfo *tcon, send_lock_cancel(const unsigned int xid, struct cifs_tcon *tcon,
struct smb_hdr *in_buf, struct smb_hdr *in_buf,
struct smb_hdr *out_buf) struct smb_hdr *out_buf)
{ {
int bytes_returned; int bytes_returned;
struct cifsSesInfo *ses = tcon->ses; struct cifs_ses *ses = tcon->ses;
LOCK_REQ *pSMB = (LOCK_REQ *)in_buf; LOCK_REQ *pSMB = (LOCK_REQ *)in_buf;
/* We just modify the current in_buf to change /* We just modify the current in_buf to change
@ -783,14 +783,14 @@ send_lock_cancel(const unsigned int xid, struct cifsTconInfo *tcon,
} }
int int
SendReceiveBlockingLock(const unsigned int xid, struct cifsTconInfo *tcon, SendReceiveBlockingLock(const unsigned int xid, struct cifs_tcon *tcon,
struct smb_hdr *in_buf, struct smb_hdr *out_buf, struct smb_hdr *in_buf, struct smb_hdr *out_buf,
int *pbytes_returned) int *pbytes_returned)
{ {
int rc = 0; int rc = 0;
int rstart = 0; int rstart = 0;
struct mid_q_entry *midQ; struct mid_q_entry *midQ;
struct cifsSesInfo *ses; struct cifs_ses *ses;
if (tcon == NULL || tcon->ses == NULL) { if (tcon == NULL || tcon->ses == NULL) {
cERROR(1, "Null smb session"); cERROR(1, "Null smb session");

View File

@ -49,7 +49,7 @@ int cifs_removexattr(struct dentry *direntry, const char *ea_name)
int xid; int xid;
struct cifs_sb_info *cifs_sb; struct cifs_sb_info *cifs_sb;
struct tcon_link *tlink; struct tcon_link *tlink;
struct cifsTconInfo *pTcon; struct cifs_tcon *pTcon;
struct super_block *sb; struct super_block *sb;
char *full_path = NULL; char *full_path = NULL;
@ -109,7 +109,7 @@ int cifs_setxattr(struct dentry *direntry, const char *ea_name,
int xid; int xid;
struct cifs_sb_info *cifs_sb; struct cifs_sb_info *cifs_sb;
struct tcon_link *tlink; struct tcon_link *tlink;
struct cifsTconInfo *pTcon; struct cifs_tcon *pTcon;
struct super_block *sb; struct super_block *sb;
char *full_path; char *full_path;
struct cifs_ntsd *pacl; struct cifs_ntsd *pacl;
@ -240,7 +240,7 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name,
int xid; int xid;
struct cifs_sb_info *cifs_sb; struct cifs_sb_info *cifs_sb;
struct tcon_link *tlink; struct tcon_link *tlink;
struct cifsTconInfo *pTcon; struct cifs_tcon *pTcon;
struct super_block *sb; struct super_block *sb;
char *full_path; char *full_path;
@ -372,7 +372,7 @@ ssize_t cifs_listxattr(struct dentry *direntry, char *data, size_t buf_size)
int xid; int xid;
struct cifs_sb_info *cifs_sb; struct cifs_sb_info *cifs_sb;
struct tcon_link *tlink; struct tcon_link *tlink;
struct cifsTconInfo *pTcon; struct cifs_tcon *pTcon;
struct super_block *sb; struct super_block *sb;
char *full_path; char *full_path;