Skip to content

Commit 96daf2b

Browse files
author
Steve French
committed
[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>
1 parent 07cc6cf commit 96daf2b

24 files changed

Lines changed: 353 additions & 353 deletions

‎fs/cifs/cache.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ static char *extract_sharename(const char *treename)
146146
static uint16_t cifs_super_get_key(const void *cookie_netfs_data, void *buffer,
147147
uint16_t maxbuf)
148148
{
149-
const struct cifsTconInfo *tcon = cookie_netfs_data;
149+
const struct cifs_tcon *tcon = cookie_netfs_data;
150150
char *sharename;
151151
uint16_t len;
152152

@@ -173,7 +173,7 @@ cifs_fscache_super_get_aux(const void *cookie_netfs_data, void *buffer,
173173
uint16_t maxbuf)
174174
{
175175
struct cifs_fscache_super_auxdata auxdata;
176-
const struct cifsTconInfo *tcon = cookie_netfs_data;
176+
const struct cifs_tcon *tcon = cookie_netfs_data;
177177

178178
memset(&auxdata, 0, sizeof(auxdata));
179179
auxdata.resource_id = tcon->resource_id;
@@ -192,7 +192,7 @@ fscache_checkaux cifs_fscache_super_check_aux(void *cookie_netfs_data,
192192
uint16_t datalen)
193193
{
194194
struct cifs_fscache_super_auxdata auxdata;
195-
const struct cifsTconInfo *tcon = cookie_netfs_data;
195+
const struct cifs_tcon *tcon = cookie_netfs_data;
196196

197197
if (datalen != sizeof(auxdata))
198198
return FSCACHE_CHECKAUX_OBSOLETE;

‎fs/cifs/cifs_debug.c‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
110110
struct list_head *tmp1, *tmp2, *tmp3;
111111
struct mid_q_entry *mid_entry;
112112
struct TCP_Server_Info *server;
113-
struct cifsSesInfo *ses;
114-
struct cifsTconInfo *tcon;
113+
struct cifs_ses *ses;
114+
struct cifs_tcon *tcon;
115115
int i, j;
116116
__u32 dev_type;
117117

@@ -152,7 +152,7 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
152152
tcp_ses_list);
153153
i++;
154154
list_for_each(tmp2, &server->smb_ses_list) {
155-
ses = list_entry(tmp2, struct cifsSesInfo,
155+
ses = list_entry(tmp2, struct cifs_ses,
156156
smb_ses_list);
157157
if ((ses->serverDomain == NULL) ||
158158
(ses->serverOS == NULL) ||
@@ -171,7 +171,7 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
171171
seq_printf(m, "TCP status: %d\n\tLocal Users To "
172172
"Server: %d SecMode: 0x%x Req On Wire: %d",
173173
server->tcpStatus, server->srv_count,
174-
server->secMode,
174+
server->sec_mode,
175175
atomic_read(&server->inFlight));
176176

177177
#ifdef CONFIG_CIFS_STATS2
@@ -183,7 +183,7 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
183183
seq_puts(m, "\n\tShares:");
184184
j = 0;
185185
list_for_each(tmp3, &ses->tcon_list) {
186-
tcon = list_entry(tmp3, struct cifsTconInfo,
186+
tcon = list_entry(tmp3, struct cifs_tcon,
187187
tcon_list);
188188
++j;
189189
dev_type = le32_to_cpu(tcon->fsDevInfo.DeviceType);
@@ -256,8 +256,8 @@ static ssize_t cifs_stats_proc_write(struct file *file,
256256
int rc;
257257
struct list_head *tmp1, *tmp2, *tmp3;
258258
struct TCP_Server_Info *server;
259-
struct cifsSesInfo *ses;
260-
struct cifsTconInfo *tcon;
259+
struct cifs_ses *ses;
260+
struct cifs_tcon *tcon;
261261

262262
rc = get_user(c, buffer);
263263
if (rc)
@@ -273,11 +273,11 @@ static ssize_t cifs_stats_proc_write(struct file *file,
273273
server = list_entry(tmp1, struct TCP_Server_Info,
274274
tcp_ses_list);
275275
list_for_each(tmp2, &server->smb_ses_list) {
276-
ses = list_entry(tmp2, struct cifsSesInfo,
276+
ses = list_entry(tmp2, struct cifs_ses,
277277
smb_ses_list);
278278
list_for_each(tmp3, &ses->tcon_list) {
279279
tcon = list_entry(tmp3,
280-
struct cifsTconInfo,
280+
struct cifs_tcon,
281281
tcon_list);
282282
atomic_set(&tcon->num_smbs_sent, 0);
283283
atomic_set(&tcon->num_writes, 0);
@@ -312,8 +312,8 @@ static int cifs_stats_proc_show(struct seq_file *m, void *v)
312312
int i;
313313
struct list_head *tmp1, *tmp2, *tmp3;
314314
struct TCP_Server_Info *server;
315-
struct cifsSesInfo *ses;
316-
struct cifsTconInfo *tcon;
315+
struct cifs_ses *ses;
316+
struct cifs_tcon *tcon;
317317

318318
seq_printf(m,
319319
"Resources in use\nCIFS Session: %d\n",
@@ -346,11 +346,11 @@ static int cifs_stats_proc_show(struct seq_file *m, void *v)
346346
server = list_entry(tmp1, struct TCP_Server_Info,
347347
tcp_ses_list);
348348
list_for_each(tmp2, &server->smb_ses_list) {
349-
ses = list_entry(tmp2, struct cifsSesInfo,
349+
ses = list_entry(tmp2, struct cifs_ses,
350350
smb_ses_list);
351351
list_for_each(tmp3, &ses->tcon_list) {
352352
tcon = list_entry(tmp3,
353-
struct cifsTconInfo,
353+
struct cifs_tcon,
354354
tcon_list);
355355
i++;
356356
seq_printf(m, "\n%d) %s", i, tcon->treeName);

‎fs/cifs/cifs_dfs_ref.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ static struct vfsmount *cifs_dfs_do_automount(struct dentry *mntpt)
272272
struct dfs_info3_param *referrals = NULL;
273273
unsigned int num_referrals = 0;
274274
struct cifs_sb_info *cifs_sb;
275-
struct cifsSesInfo *ses;
275+
struct cifs_ses *ses;
276276
char *full_path;
277277
int xid, i;
278278
int rc;

‎fs/cifs/cifs_spnego.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ struct key_type cifs_spnego_key_type = {
9595

9696
/* get a key struct with a SPNEGO security blob, suitable for session setup */
9797
struct key *
98-
cifs_get_spnego_key(struct cifsSesInfo *sesInfo)
98+
cifs_get_spnego_key(struct cifs_ses *sesInfo)
9999
{
100100
struct TCP_Server_Info *server = sesInfo->server;
101101
struct sockaddr_in *sa = (struct sockaddr_in *) &server->dstaddr;

‎fs/cifs/cifs_spnego.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ struct cifs_spnego_msg {
4141

4242
#ifdef __KERNEL__
4343
extern struct key_type cifs_spnego_key_type;
44-
extern struct key *cifs_get_spnego_key(struct cifsSesInfo *sesInfo);
44+
extern struct key *cifs_get_spnego_key(struct cifs_ses *sesInfo);
4545
#endif /* KERNEL */
4646

4747
#endif /* _CIFS_SPNEGO_H */

‎fs/cifs/cifsacl.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,7 @@ static struct cifs_ntsd *get_cifs_acl_by_path(struct cifs_sb_info *cifs_sb,
945945
int oplock = 0;
946946
int xid, rc;
947947
__u16 fid;
948-
struct cifsTconInfo *tcon;
948+
struct cifs_tcon *tcon;
949949
struct tcon_link *tlink = cifs_sb_tlink(cifs_sb);
950950

951951
if (IS_ERR(tlink))
@@ -1013,7 +1013,7 @@ static int set_cifs_acl_by_path(struct cifs_sb_info *cifs_sb, const char *path,
10131013
int oplock = 0;
10141014
int xid, rc;
10151015
__u16 fid;
1016-
struct cifsTconInfo *tcon;
1016+
struct cifs_tcon *tcon;
10171017
struct tcon_link *tlink = cifs_sb_tlink(cifs_sb);
10181018

10191019
if (IS_ERR(tlink))

‎fs/cifs/cifsencrypt.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ int cifs_verify_signature(struct smb_hdr *cifs_pdu,
229229
}
230230

231231
/* first calculate 24 bytes ntlm response and then 16 byte session key */
232-
int setup_ntlm_response(struct cifsSesInfo *ses)
232+
int setup_ntlm_response(struct cifs_ses *ses)
233233
{
234234
int rc = 0;
235235
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,
312312
* Allocate domain name which gets freed when session struct is deallocated.
313313
*/
314314
static int
315-
build_avpair_blob(struct cifsSesInfo *ses, const struct nls_table *nls_cp)
315+
build_avpair_blob(struct cifs_ses *ses, const struct nls_table *nls_cp)
316316
{
317317
unsigned int dlen;
318318
unsigned int wlen;
@@ -400,7 +400,7 @@ build_avpair_blob(struct cifsSesInfo *ses, const struct nls_table *nls_cp)
400400
* about target string i.e. for some, just user name might suffice.
401401
*/
402402
static int
403-
find_domain_name(struct cifsSesInfo *ses, const struct nls_table *nls_cp)
403+
find_domain_name(struct cifs_ses *ses, const struct nls_table *nls_cp)
404404
{
405405
unsigned int attrsize;
406406
unsigned int type;
@@ -445,7 +445,7 @@ find_domain_name(struct cifsSesInfo *ses, const struct nls_table *nls_cp)
445445
return 0;
446446
}
447447

448-
static int calc_ntlmv2_hash(struct cifsSesInfo *ses, char *ntlmv2_hash,
448+
static int calc_ntlmv2_hash(struct cifs_ses *ses, char *ntlmv2_hash,
449449
const struct nls_table *nls_cp)
450450
{
451451
int rc = 0;
@@ -527,7 +527,7 @@ static int calc_ntlmv2_hash(struct cifsSesInfo *ses, char *ntlmv2_hash,
527527
}
528528

529529
static int
530-
CalcNTLMv2_response(const struct cifsSesInfo *ses, char *ntlmv2_hash)
530+
CalcNTLMv2_response(const struct cifs_ses *ses, char *ntlmv2_hash)
531531
{
532532
int rc;
533533
unsigned int offset = CIFS_SESS_KEY_SIZE + 8;
@@ -563,7 +563,7 @@ CalcNTLMv2_response(const struct cifsSesInfo *ses, char *ntlmv2_hash)
563563

564564

565565
int
566-
setup_ntlmv2_rsp(struct cifsSesInfo *ses, const struct nls_table *nls_cp)
566+
setup_ntlmv2_rsp(struct cifs_ses *ses, const struct nls_table *nls_cp)
567567
{
568568
int rc;
569569
int baselen;
@@ -649,7 +649,7 @@ setup_ntlmv2_rsp(struct cifsSesInfo *ses, const struct nls_table *nls_cp)
649649
}
650650

651651
int
652-
calc_seckey(struct cifsSesInfo *ses)
652+
calc_seckey(struct cifs_ses *ses)
653653
{
654654
int rc;
655655
struct crypto_blkcipher *tfm_arc4;

‎fs/cifs/cifsfs.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ cifs_statfs(struct dentry *dentry, struct kstatfs *buf)
208208
{
209209
struct super_block *sb = dentry->d_sb;
210210
struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
211-
struct cifsTconInfo *tcon = cifs_sb_master_tcon(cifs_sb);
211+
struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb);
212212
int rc = -EOPNOTSUPP;
213213
int xid;
214214

@@ -361,7 +361,7 @@ static int
361361
cifs_show_options(struct seq_file *s, struct vfsmount *m)
362362
{
363363
struct cifs_sb_info *cifs_sb = CIFS_SB(m->mnt_sb);
364-
struct cifsTconInfo *tcon = cifs_sb_master_tcon(cifs_sb);
364+
struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb);
365365
struct sockaddr *srcaddr;
366366
srcaddr = (struct sockaddr *)&tcon->ses->server->srcaddr;
367367

@@ -461,7 +461,7 @@ cifs_show_options(struct seq_file *s, struct vfsmount *m)
461461
static void cifs_umount_begin(struct super_block *sb)
462462
{
463463
struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
464-
struct cifsTconInfo *tcon;
464+
struct cifs_tcon *tcon;
465465

466466
if (cifs_sb == NULL)
467467
return;

‎fs/cifs/cifsglob.h‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ struct TCP_Server_Info {
254254
struct mutex srv_mutex;
255255
struct task_struct *tsk;
256256
char server_GUID[16];
257-
char secMode;
257+
char sec_mode;
258258
bool session_estab; /* mark when very first sess is established */
259259
u16 dialect; /* dialect index that server chose */
260260
enum securityEnum secType;
@@ -329,7 +329,7 @@ static inline void cifs_set_net_ns(struct TCP_Server_Info *srv, struct net *net)
329329
/*
330330
* Session structure. One of these for each uid session with a particular host
331331
*/
332-
struct cifsSesInfo {
332+
struct cifs_ses {
333333
struct list_head smb_ses_list;
334334
struct list_head tcon_list;
335335
struct mutex session_mutex;
@@ -369,11 +369,11 @@ struct cifsSesInfo {
369369
* there is one of these for each connection to a resource on a particular
370370
* session
371371
*/
372-
struct cifsTconInfo {
372+
struct cifs_tcon {
373373
struct list_head tcon_list;
374374
int tc_count;
375375
struct list_head openFileList;
376-
struct cifsSesInfo *ses; /* pointer to session associated with */
376+
struct cifs_ses *ses; /* pointer to session associated with */
377377
char treeName[MAX_TREE_SIZE + 1]; /* UNC name of resource in ASCII */
378378
char *nativeFileSystem;
379379
char *password; /* for share-level security */
@@ -455,12 +455,12 @@ struct tcon_link {
455455
#define TCON_LINK_IN_TREE 2
456456
unsigned long tl_time;
457457
atomic_t tl_count;
458-
struct cifsTconInfo *tl_tcon;
458+
struct cifs_tcon *tl_tcon;
459459
};
460460

461461
extern struct tcon_link *cifs_sb_tlink(struct cifs_sb_info *cifs_sb);
462462

463-
static inline struct cifsTconInfo *
463+
static inline struct cifs_tcon *
464464
tlink_tcon(struct tcon_link *tlink)
465465
{
466466
return tlink->tl_tcon;
@@ -477,7 +477,7 @@ cifs_get_tlink(struct tcon_link *tlink)
477477
}
478478

479479
/* This function is always expected to succeed */
480-
extern struct cifsTconInfo *cifs_sb_master_tcon(struct cifs_sb_info *cifs_sb);
480+
extern struct cifs_tcon *cifs_sb_master_tcon(struct cifs_sb_info *cifs_sb);
481481

482482
/*
483483
* This info hangs off the cifsFileInfo structure, pointed to by llist.
@@ -535,7 +535,7 @@ struct cifs_io_parms {
535535
__u32 pid;
536536
__u64 offset;
537537
unsigned int length;
538-
struct cifsTconInfo *tcon;
538+
struct cifs_tcon *tcon;
539539
};
540540

541541
/*
@@ -615,7 +615,7 @@ convert_delimiter(char *path, char delim)
615615
#ifdef CONFIG_CIFS_STATS
616616
#define cifs_stats_inc atomic_inc
617617

618-
static inline void cifs_stats_bytes_written(struct cifsTconInfo *tcon,
618+
static inline void cifs_stats_bytes_written(struct cifs_tcon *tcon,
619619
unsigned int bytes)
620620
{
621621
if (bytes) {
@@ -625,7 +625,7 @@ static inline void cifs_stats_bytes_written(struct cifsTconInfo *tcon,
625625
}
626626
}
627627

628-
static inline void cifs_stats_bytes_read(struct cifsTconInfo *tcon,
628+
static inline void cifs_stats_bytes_read(struct cifs_tcon *tcon,
629629
unsigned int bytes)
630630
{
631631
spin_lock(&tcon->stat_lock);
@@ -675,7 +675,7 @@ struct mid_q_entry {
675675
struct oplock_q_entry {
676676
struct list_head qhead;
677677
struct inode *pinode;
678-
struct cifsTconInfo *tcon;
678+
struct cifs_tcon *tcon;
679679
__u16 netfid;
680680
};
681681

0 commit comments

Comments
 (0)