aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2008-12-02 19:57:54 -0500
committerSteve French <sfrench@us.ibm.com>2008-12-25 21:29:10 -0500
commit61e748015866e48aff91284e3d300c6e3035a87a (patch)
treef31c94e76a900b9bd7d6f0abf6e1f4c74ac2e51f /fs
parent3de2091ac722e7dbc37d87d9112ab19ec6a871de (diff)
[CIFS] various minor cleanups pointed out by checkpatch script
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/AUTHORS2
-rw-r--r--fs/cifs/cifsfs.c19
-rw-r--r--fs/cifs/cifspdu.h2
-rw-r--r--fs/cifs/cifssmb.c16
-rw-r--r--fs/cifs/connect.c18
-rw-r--r--fs/cifs/dir.c9
6 files changed, 29 insertions, 37 deletions
diff --git a/fs/cifs/AUTHORS b/fs/cifs/AUTHORS
index 9c136d7803d..7f7fa3c302a 100644
--- a/fs/cifs/AUTHORS
+++ b/fs/cifs/AUTHORS
@@ -36,7 +36,9 @@ Miklos Szeredi
36Kazeon team for various fixes especially for 2.4 version. 36Kazeon team for various fixes especially for 2.4 version.
37Asser Ferno (Change Notify support) 37Asser Ferno (Change Notify support)
38Shaggy (Dave Kleikamp) for inumerable small fs suggestions and some good cleanup 38Shaggy (Dave Kleikamp) for inumerable small fs suggestions and some good cleanup
39Gunter Kukkukk (testing and suggestions for support of old servers)
39Igor Mammedov (DFS support) 40Igor Mammedov (DFS support)
41Jeff Layton (many, many fixes, as well as great work on the cifs Kerberos code)
40 42
41Test case and Bug Report contributors 43Test case and Bug Report contributors
42------------------------------------- 44-------------------------------------
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 061a1dca987..974c8f0e615 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -347,7 +347,6 @@ cifs_show_options(struct seq_file *s, struct vfsmount *m)
347 if (cifs_sb) { 347 if (cifs_sb) {
348 tcon = cifs_sb->tcon; 348 tcon = cifs_sb->tcon;
349 if (tcon) { 349 if (tcon) {
350/* BB add prepath to mount options displayed */
351 seq_printf(s, ",unc=%s", cifs_sb->tcon->treeName); 350 seq_printf(s, ",unc=%s", cifs_sb->tcon->treeName);
352 if (tcon->ses) { 351 if (tcon->ses) {
353 if (tcon->ses->userName) 352 if (tcon->ses->userName)
@@ -439,9 +438,8 @@ int cifs_xquota_set(struct super_block *sb, int quota_type, qid_t qid,
439 xid = GetXid(); 438 xid = GetXid();
440 if (pTcon) { 439 if (pTcon) {
441 cFYI(1, ("set type: 0x%x id: %d", quota_type, qid)); 440 cFYI(1, ("set type: 0x%x id: %d", quota_type, qid));
442 } else { 441 } else
443 rc = -EIO; 442 rc = -EIO;
444 }
445 443
446 FreeXid(xid); 444 FreeXid(xid);
447 return rc; 445 return rc;
@@ -463,9 +461,8 @@ int cifs_xquota_get(struct super_block *sb, int quota_type, qid_t qid,
463 xid = GetXid(); 461 xid = GetXid();
464 if (pTcon) { 462 if (pTcon) {
465 cFYI(1, ("set type: 0x%x id: %d", quota_type, qid)); 463 cFYI(1, ("set type: 0x%x id: %d", quota_type, qid));
466 } else { 464 } else
467 rc = -EIO; 465 rc = -EIO;
468 }
469 466
470 FreeXid(xid); 467 FreeXid(xid);
471 return rc; 468 return rc;
@@ -486,9 +483,8 @@ int cifs_xstate_set(struct super_block *sb, unsigned int flags, int operation)
486 xid = GetXid(); 483 xid = GetXid();
487 if (pTcon) { 484 if (pTcon) {
488 cFYI(1, ("flags: 0x%x operation: 0x%x", flags, operation)); 485 cFYI(1, ("flags: 0x%x operation: 0x%x", flags, operation));
489 } else { 486 } else
490 rc = -EIO; 487 rc = -EIO;
491 }
492 488
493 FreeXid(xid); 489 FreeXid(xid);
494 return rc; 490 return rc;
@@ -501,17 +497,16 @@ int cifs_xstate_get(struct super_block *sb, struct fs_quota_stat *qstats)
501 struct cifs_sb_info *cifs_sb = CIFS_SB(sb); 497 struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
502 struct cifsTconInfo *pTcon; 498 struct cifsTconInfo *pTcon;
503 499
504 if (cifs_sb) { 500 if (cifs_sb)
505 pTcon = cifs_sb->tcon; 501 pTcon = cifs_sb->tcon;
506 } else { 502 else
507 return -EIO; 503 return -EIO;
508 } 504
509 xid = GetXid(); 505 xid = GetXid();
510 if (pTcon) { 506 if (pTcon) {
511 cFYI(1, ("pqstats %p", qstats)); 507 cFYI(1, ("pqstats %p", qstats));
512 } else { 508 } else
513 rc = -EIO; 509 rc = -EIO;
514 }
515 510
516 FreeXid(xid); 511 FreeXid(xid);
517 return rc; 512 return rc;
diff --git a/fs/cifs/cifspdu.h b/fs/cifs/cifspdu.h
index d2a073edd1b..b4e2e9f0ee3 100644
--- a/fs/cifs/cifspdu.h
+++ b/fs/cifs/cifspdu.h
@@ -1922,7 +1922,7 @@ typedef struct smb_com_transaction2_get_dfs_refer_req {
1922/* DFS server target type */ 1922/* DFS server target type */
1923#define DFS_TYPE_LINK 0x0000 /* also for sysvol targets */ 1923#define DFS_TYPE_LINK 0x0000 /* also for sysvol targets */
1924#define DFS_TYPE_ROOT 0x0001 1924#define DFS_TYPE_ROOT 0x0001
1925 1925
1926/* Referral Entry Flags */ 1926/* Referral Entry Flags */
1927#define DFS_NAME_LIST_REF 0x0200 1927#define DFS_NAME_LIST_REF 0x0200
1928 1928
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 6d51696dc76..ef9786b6bea 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -1382,13 +1382,13 @@ openRetry:
1382 if (cpu_to_le32(FILE_CREATE) == pSMBr->CreateAction) 1382 if (cpu_to_le32(FILE_CREATE) == pSMBr->CreateAction)
1383 *pOplock |= CIFS_CREATE_ACTION; 1383 *pOplock |= CIFS_CREATE_ACTION;
1384 if (pfile_info) { 1384 if (pfile_info) {
1385 memcpy((char *)pfile_info, (char *)&pSMBr->CreationTime, 1385 memcpy((char *)pfile_info, (char *)&pSMBr->CreationTime,
1386 36 /* CreationTime to Attributes */); 1386 36 /* CreationTime to Attributes */);
1387 /* the file_info buf is endian converted by caller */ 1387 /* the file_info buf is endian converted by caller */
1388 pfile_info->AllocationSize = pSMBr->AllocationSize; 1388 pfile_info->AllocationSize = pSMBr->AllocationSize;
1389 pfile_info->EndOfFile = pSMBr->EndOfFile; 1389 pfile_info->EndOfFile = pSMBr->EndOfFile;
1390 pfile_info->NumberOfLinks = cpu_to_le32(1); 1390 pfile_info->NumberOfLinks = cpu_to_le32(1);
1391 pfile_info->DeletePending = 0; 1391 pfile_info->DeletePending = 0;
1392 } 1392 }
1393 } 1393 }
1394 1394
@@ -1558,7 +1558,7 @@ CIFSSMBWrite(const int xid, struct cifsTconInfo *tcon,
1558 pSMB->DataOffset = 1558 pSMB->DataOffset =
1559 cpu_to_le16(offsetof(struct smb_com_write_req, Data) - 4); 1559 cpu_to_le16(offsetof(struct smb_com_write_req, Data) - 4);
1560 if (buf) 1560 if (buf)
1561 memcpy(pSMB->Data, buf, bytes_sent); 1561 memcpy(pSMB->Data, buf, bytes_sent);
1562 else if (ubuf) { 1562 else if (ubuf) {
1563 if (copy_from_user(pSMB->Data, ubuf, bytes_sent)) { 1563 if (copy_from_user(pSMB->Data, ubuf, bytes_sent)) {
1564 cifs_buf_release(pSMB); 1564 cifs_buf_release(pSMB);
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 35194204283..6107ee42b09 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -2582,7 +2582,7 @@ CIFSSessSetup(unsigned int xid, struct cifsSesInfo *ses,
2582 __u16 action = le16_to_cpu(pSMBr->resp.Action); 2582 __u16 action = le16_to_cpu(pSMBr->resp.Action);
2583 __u16 blob_len = le16_to_cpu(pSMBr->resp.SecurityBlobLength); 2583 __u16 blob_len = le16_to_cpu(pSMBr->resp.SecurityBlobLength);
2584 if (action & GUEST_LOGIN) 2584 if (action & GUEST_LOGIN)
2585 cFYI(1, (" Guest login")); /* BB mark SesInfo struct? */ 2585 cFYI(1, ("Guest login")); /* BB mark SesInfo struct? */
2586 ses->Suid = smb_buffer_response->Uid; /* UID left in wire format 2586 ses->Suid = smb_buffer_response->Uid; /* UID left in wire format
2587 (little endian) */ 2587 (little endian) */
2588 cFYI(1, ("UID = %d ", ses->Suid)); 2588 cFYI(1, ("UID = %d ", ses->Suid));
@@ -2728,13 +2728,11 @@ CIFSSessSetup(unsigned int xid, struct cifsSesInfo *ses,
2728 len)); 2728 len));
2729 } 2729 }
2730 } else { 2730 } else {
2731 cERROR(1, 2731 cERROR(1, ("Security Blob Length extends beyond "
2732 (" Security Blob Length extends beyond "
2733 "end of SMB")); 2732 "end of SMB"));
2734 } 2733 }
2735 } else { 2734 } else {
2736 cERROR(1, 2735 cERROR(1, ("Invalid Word count %d: ",
2737 (" Invalid Word count %d: ",
2738 smb_buffer_response->WordCount)); 2736 smb_buffer_response->WordCount));
2739 rc = -EIO; 2737 rc = -EIO;
2740 } 2738 }
@@ -2892,7 +2890,7 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid,
2892 __u16 blob_len = le16_to_cpu(pSMBr->resp.SecurityBlobLength); 2890 __u16 blob_len = le16_to_cpu(pSMBr->resp.SecurityBlobLength);
2893 2891
2894 if (action & GUEST_LOGIN) 2892 if (action & GUEST_LOGIN)
2895 cFYI(1, (" Guest login")); 2893 cFYI(1, ("Guest login"));
2896 /* Do we want to set anything in SesInfo struct when guest login? */ 2894 /* Do we want to set anything in SesInfo struct when guest login? */
2897 2895
2898 bcc_ptr = pByteArea(smb_buffer_response); 2896 bcc_ptr = pByteArea(smb_buffer_response);
@@ -2900,8 +2898,7 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid,
2900 2898
2901 SecurityBlob2 = (PCHALLENGE_MESSAGE) bcc_ptr; 2899 SecurityBlob2 = (PCHALLENGE_MESSAGE) bcc_ptr;
2902 if (SecurityBlob2->MessageType != NtLmChallenge) { 2900 if (SecurityBlob2->MessageType != NtLmChallenge) {
2903 cFYI(1, 2901 cFYI(1, ("Unexpected NTLMSSP message type received %d",
2904 ("Unexpected NTLMSSP message type received %d",
2905 SecurityBlob2->MessageType)); 2902 SecurityBlob2->MessageType));
2906 } else if (ses) { 2903 } else if (ses) {
2907 ses->Suid = smb_buffer_response->Uid; /* UID left in le format */ 2904 ses->Suid = smb_buffer_response->Uid; /* UID left in le format */
@@ -3073,8 +3070,7 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid,
3073 cERROR(1, ("No session structure passed in.")); 3070 cERROR(1, ("No session structure passed in."));
3074 } 3071 }
3075 } else { 3072 } else {
3076 cERROR(1, 3073 cERROR(1, ("Invalid Word count %d:",
3077 (" Invalid Word count %d:",
3078 smb_buffer_response->WordCount)); 3074 smb_buffer_response->WordCount));
3079 rc = -EIO; 3075 rc = -EIO;
3080 } 3076 }
@@ -3313,7 +3309,7 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses,
3313 __u16 action = le16_to_cpu(pSMBr->resp.Action); 3309 __u16 action = le16_to_cpu(pSMBr->resp.Action);
3314 __u16 blob_len = le16_to_cpu(pSMBr->resp.SecurityBlobLength); 3310 __u16 blob_len = le16_to_cpu(pSMBr->resp.SecurityBlobLength);
3315 if (action & GUEST_LOGIN) 3311 if (action & GUEST_LOGIN)
3316 cFYI(1, (" Guest login")); /* BB Should we set anything 3312 cFYI(1, ("Guest login")); /* BB Should we set anything
3317 in SesInfo struct ? */ 3313 in SesInfo struct ? */
3318/* if (SecurityBlob2->MessageType != NtLm??) { 3314/* if (SecurityBlob2->MessageType != NtLm??) {
3319 cFYI("Unexpected message type on auth response is %d")); 3315 cFYI("Unexpected message type on auth response is %d"));
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index e962e75e6f7..0592dbb3a6b 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -483,7 +483,7 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry,
483 483
484 xid = GetXid(); 484 xid = GetXid();
485 485
486 cFYI(1, (" parent inode = 0x%p name is: %s and dentry = 0x%p", 486 cFYI(1, ("parent inode = 0x%p name is: %s and dentry = 0x%p",
487 parent_dir_inode, direntry->d_name.name, direntry)); 487 parent_dir_inode, direntry->d_name.name, direntry));
488 488
489 /* check whether path exists */ 489 /* check whether path exists */
@@ -515,12 +515,11 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry,
515 } 515 }
516 516
517 if (direntry->d_inode != NULL) { 517 if (direntry->d_inode != NULL) {
518 cFYI(1, (" non-NULL inode in lookup")); 518 cFYI(1, ("non-NULL inode in lookup"));
519 } else { 519 } else {
520 cFYI(1, (" NULL inode in lookup")); 520 cFYI(1, ("NULL inode in lookup"));
521 } 521 }
522 cFYI(1, 522 cFYI(1, ("Full path: %s inode = 0x%p", full_path, direntry->d_inode));
523 (" Full path: %s inode = 0x%p", full_path, direntry->d_inode));
524 523
525 if (pTcon->unix_ext) 524 if (pTcon->unix_ext)
526 rc = cifs_get_inode_info_unix(&newInode, full_path, 525 rc = cifs_get_inode_info_unix(&newInode, full_path,