aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/cifs_debug.c14
-rw-r--r--fs/cifs/cifs_debug.h3
-rw-r--r--fs/cifs/cifsacl.c44
-rw-r--r--fs/cifs/cifsfs.c10
-rw-r--r--fs/cifs/cifsproto.h8
-rw-r--r--fs/cifs/cifssmb.c6
-rw-r--r--fs/cifs/connect.c10
-rw-r--r--fs/cifs/file.c13
-rw-r--r--fs/cifs/inode.c4
-rw-r--r--fs/cifs/netmisc.c8
-rw-r--r--fs/cifs/readdir.c6
-rw-r--r--fs/cifs/sess.c4
-rw-r--r--fs/cifs/transport.c5
13 files changed, 51 insertions, 84 deletions
diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c
index 4bd863716f7..892fc70cc95 100644
--- a/fs/cifs/cifs_debug.c
+++ b/fs/cifs/cifs_debug.c
@@ -438,7 +438,7 @@ cifs_stats_read(char *buf, char **beginBuffer, off_t offset,
438 438
439 return length; 439 return length;
440} 440}
441#endif 441#endif /* STATS */
442 442
443static struct proc_dir_entry *proc_fs_cifs; 443static struct proc_dir_entry *proc_fs_cifs;
444read_proc_t cifs_txanchor_read; 444read_proc_t cifs_txanchor_read;
@@ -481,7 +481,7 @@ cifs_proc_init(void)
481 cifs_stats_read, NULL); 481 cifs_stats_read, NULL);
482 if (pde) 482 if (pde)
483 pde->write_proc = cifs_stats_write; 483 pde->write_proc = cifs_stats_write;
484#endif 484#endif /* STATS */
485 pde = create_proc_read_entry("cifsFYI", 0, proc_fs_cifs, 485 pde = create_proc_read_entry("cifsFYI", 0, proc_fs_cifs,
486 cifsFYI_read, NULL); 486 cifsFYI_read, NULL);
487 if (pde) 487 if (pde)
@@ -917,4 +917,12 @@ security_flags_write(struct file *file, const char __user *buffer,
917 /* BB should we turn on MAY flags for other MUST options? */ 917 /* BB should we turn on MAY flags for other MUST options? */
918 return count; 918 return count;
919} 919}
920#endif 920#else
921static inline void cifs_proc_init(void)
922{
923}
924
925static inline void cifs_proc_clean(void)
926{
927}
928#endif /* PROC_FS */
diff --git a/fs/cifs/cifs_debug.h b/fs/cifs/cifs_debug.h
index 90e7624a254..5eb3b83bbfa 100644
--- a/fs/cifs/cifs_debug.h
+++ b/fs/cifs/cifs_debug.h
@@ -25,8 +25,11 @@
25 25
26void cifs_dump_mem(char *label, void *data, int length); 26void cifs_dump_mem(char *label, void *data, int length);
27#ifdef CONFIG_CIFS_DEBUG2 27#ifdef CONFIG_CIFS_DEBUG2
28#define DBG2 2
28void cifs_dump_detail(struct smb_hdr *); 29void cifs_dump_detail(struct smb_hdr *);
29void cifs_dump_mids(struct TCP_Server_Info *); 30void cifs_dump_mids(struct TCP_Server_Info *);
31#else
32#define DBG2 0
30#endif 33#endif
31extern int traceSMB; /* flag which enables the function below */ 34extern int traceSMB; /* flag which enables the function below */
32void dump_smb(struct smb_hdr *, int); 35void dump_smb(struct smb_hdr *, int);
diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c
index 842aaa92168..49485108454 100644
--- a/fs/cifs/cifsacl.c
+++ b/fs/cifs/cifsacl.c
@@ -215,9 +215,7 @@ static void access_flags_to_mode(__le32 ace_flags, int type, umode_t *pmode,
215 215
216 if (flags & GENERIC_ALL) { 216 if (flags & GENERIC_ALL) {
217 *pmode |= (S_IRWXUGO & (*pbits_to_set)); 217 *pmode |= (S_IRWXUGO & (*pbits_to_set));
218#ifdef CONFIG_CIFS_DEBUG2 218 cFYI(DBG2, ("all perms"));
219 cFYI(1, ("all perms"));
220#endif
221 return; 219 return;
222 } 220 }
223 if ((flags & GENERIC_WRITE) || 221 if ((flags & GENERIC_WRITE) ||
@@ -230,9 +228,7 @@ static void access_flags_to_mode(__le32 ace_flags, int type, umode_t *pmode,
230 ((flags & FILE_EXEC_RIGHTS) == FILE_EXEC_RIGHTS)) 228 ((flags & FILE_EXEC_RIGHTS) == FILE_EXEC_RIGHTS))
231 *pmode |= (S_IXUGO & (*pbits_to_set)); 229 *pmode |= (S_IXUGO & (*pbits_to_set));
232 230
233#ifdef CONFIG_CIFS_DEBUG2 231 cFYI(DBG2, ("access flags 0x%x mode now 0x%x", flags, *pmode));
234 cFYI(1, ("access flags 0x%x mode now 0x%x", flags, *pmode));
235#endif
236 return; 232 return;
237} 233}
238 234
@@ -261,9 +257,7 @@ static void mode_to_access_flags(umode_t mode, umode_t bits_to_use,
261 if (mode & S_IXUGO) 257 if (mode & S_IXUGO)
262 *pace_flags |= SET_FILE_EXEC_RIGHTS; 258 *pace_flags |= SET_FILE_EXEC_RIGHTS;
263 259
264#ifdef CONFIG_CIFS_DEBUG2 260 cFYI(DBG2, ("mode: 0x%x, access flags now 0x%x", mode, *pace_flags));
265 cFYI(1, ("mode: 0x%x, access flags now 0x%x", mode, *pace_flags));
266#endif
267 return; 261 return;
268} 262}
269 263
@@ -357,11 +351,9 @@ static void parse_dacl(struct cifs_acl *pdacl, char *end_of_acl,
357 return; 351 return;
358 } 352 }
359 353
360#ifdef CONFIG_CIFS_DEBUG2 354 cFYI(DBG2, ("DACL revision %d size %d num aces %d",
361 cFYI(1, ("DACL revision %d size %d num aces %d",
362 le16_to_cpu(pdacl->revision), le16_to_cpu(pdacl->size), 355 le16_to_cpu(pdacl->revision), le16_to_cpu(pdacl->size),
363 le32_to_cpu(pdacl->num_aces))); 356 le32_to_cpu(pdacl->num_aces)));
364#endif
365 357
366 /* reset rwx permissions for user/group/other. 358 /* reset rwx permissions for user/group/other.
367 Also, if num_aces is 0 i.e. DACL has no ACEs, 359 Also, if num_aces is 0 i.e. DACL has no ACEs,
@@ -494,13 +486,11 @@ static int parse_sec_desc(struct cifs_ntsd *pntsd, int acl_len,
494 le32_to_cpu(pntsd->gsidoffset)); 486 le32_to_cpu(pntsd->gsidoffset));
495 dacloffset = le32_to_cpu(pntsd->dacloffset); 487 dacloffset = le32_to_cpu(pntsd->dacloffset);
496 dacl_ptr = (struct cifs_acl *)((char *)pntsd + dacloffset); 488 dacl_ptr = (struct cifs_acl *)((char *)pntsd + dacloffset);
497#ifdef CONFIG_CIFS_DEBUG2 489 cFYI(DBG2, ("revision %d type 0x%x ooffset 0x%x goffset 0x%x "
498 cFYI(1, ("revision %d type 0x%x ooffset 0x%x goffset 0x%x "
499 "sacloffset 0x%x dacloffset 0x%x", 490 "sacloffset 0x%x dacloffset 0x%x",
500 pntsd->revision, pntsd->type, le32_to_cpu(pntsd->osidoffset), 491 pntsd->revision, pntsd->type, le32_to_cpu(pntsd->osidoffset),
501 le32_to_cpu(pntsd->gsidoffset), 492 le32_to_cpu(pntsd->gsidoffset),
502 le32_to_cpu(pntsd->sacloffset), dacloffset)); 493 le32_to_cpu(pntsd->sacloffset), dacloffset));
503#endif
504/* cifs_dump_mem("owner_sid: ", owner_sid_ptr, 64); */ 494/* cifs_dump_mem("owner_sid: ", owner_sid_ptr, 64); */
505 rc = parse_sid(owner_sid_ptr, end_of_acl); 495 rc = parse_sid(owner_sid_ptr, end_of_acl);
506 if (rc) 496 if (rc)
@@ -635,9 +625,7 @@ static int set_cifs_acl(struct cifs_ntsd *pnntsd, __u32 acllen,
635 struct super_block *sb; 625 struct super_block *sb;
636 struct cifs_sb_info *cifs_sb; 626 struct cifs_sb_info *cifs_sb;
637 627
638#ifdef CONFIG_CIFS_DEBUG2 628 cFYI(DBG2, ("set ACL for %s from mode 0x%x", path, inode->i_mode));
639 cFYI(1, ("set ACL for %s from mode 0x%x", path, inode->i_mode));
640#endif
641 629
642 if (!inode) 630 if (!inode)
643 return (rc); 631 return (rc);
@@ -668,9 +656,7 @@ static int set_cifs_acl(struct cifs_ntsd *pnntsd, __u32 acllen,
668 } 656 }
669 657
670 rc = CIFSSMBSetCIFSACL(xid, cifs_sb->tcon, fid, pnntsd, acllen); 658 rc = CIFSSMBSetCIFSACL(xid, cifs_sb->tcon, fid, pnntsd, acllen);
671#ifdef CONFIG_CIFS_DEBUG2 659 cFYI(DBG2, ("SetCIFSACL rc = %d", rc));
672 cFYI(1, ("SetCIFSACL rc = %d", rc));
673#endif
674 if (unlock_file == TRUE) 660 if (unlock_file == TRUE)
675 atomic_dec(&open_file->wrtPending); 661 atomic_dec(&open_file->wrtPending);
676 else 662 else
@@ -688,9 +674,7 @@ void acl_to_uid_mode(struct inode *inode, const char *path)
688 u32 acllen = 0; 674 u32 acllen = 0;
689 int rc = 0; 675 int rc = 0;
690 676
691#ifdef CONFIG_CIFS_DEBUG2 677 cFYI(DBG2, ("converting ACL to mode for %s", path));
692 cFYI(1, ("converting ACL to mode for %s", path));
693#endif
694 pntsd = get_cifs_acl(&acllen, inode, path); 678 pntsd = get_cifs_acl(&acllen, inode, path);
695 679
696 /* if we can retrieve the ACL, now parse Access Control Entries, ACEs */ 680 /* if we can retrieve the ACL, now parse Access Control Entries, ACEs */
@@ -711,9 +695,7 @@ int mode_to_acl(struct inode *inode, const char *path, __u64 nmode)
711 struct cifs_ntsd *pntsd = NULL; /* acl obtained from server */ 695 struct cifs_ntsd *pntsd = NULL; /* acl obtained from server */
712 struct cifs_ntsd *pnntsd = NULL; /* modified acl to be sent to server */ 696 struct cifs_ntsd *pnntsd = NULL; /* modified acl to be sent to server */
713 697
714#ifdef CONFIG_CIFS_DEBUG2 698 cFYI(DBG2, ("set ACL from mode for %s", path));
715 cFYI(1, ("set ACL from mode for %s", path));
716#endif
717 699
718 /* Get the security descriptor */ 700 /* Get the security descriptor */
719 pntsd = get_cifs_acl(&acllen, inode, path); 701 pntsd = get_cifs_acl(&acllen, inode, path);
@@ -735,16 +717,12 @@ int mode_to_acl(struct inode *inode, const char *path, __u64 nmode)
735 717
736 rc = build_sec_desc(pntsd, pnntsd, acllen, inode, nmode); 718 rc = build_sec_desc(pntsd, pnntsd, acllen, inode, nmode);
737 719
738#ifdef CONFIG_CIFS_DEBUG2 720 cFYI(DBG2, ("build_sec_desc rc: %d", rc));
739 cFYI(1, ("build_sec_desc rc: %d", rc));
740#endif
741 721
742 if (!rc) { 722 if (!rc) {
743 /* Set the security descriptor */ 723 /* Set the security descriptor */
744 rc = set_cifs_acl(pnntsd, acllen, inode, path); 724 rc = set_cifs_acl(pnntsd, acllen, inode, path);
745#ifdef CONFIG_CIFS_DEBUG2 725 cFYI(DBG2, ("set_cifs_acl rc: %d", rc));
746 cFYI(1, ("set_cifs_acl rc: %d", rc));
747#endif
748 } 726 }
749 727
750 kfree(pnntsd); 728 kfree(pnntsd);
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index bca6a69aaf2..ff57ad4efe8 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -470,9 +470,7 @@ static void cifs_umount_begin(struct vfsmount *vfsmnt, int flags)
470 struct cifs_sb_info *cifs_sb; 470 struct cifs_sb_info *cifs_sb;
471 struct cifsTconInfo *tcon; 471 struct cifsTconInfo *tcon;
472 472
473#ifdef CONFIG_CIFS_DFS_UPCALL
474 dfs_shrink_umount_helper(vfsmnt); 473 dfs_shrink_umount_helper(vfsmnt);
475#endif /* CONFIG CIFS_DFS_UPCALL */
476 474
477 if (!(flags & MNT_FORCE)) 475 if (!(flags & MNT_FORCE))
478 return; 476 return;
@@ -991,9 +989,7 @@ static int __init
991init_cifs(void) 989init_cifs(void)
992{ 990{
993 int rc = 0; 991 int rc = 0;
994#ifdef CONFIG_PROC_FS
995 cifs_proc_init(); 992 cifs_proc_init();
996#endif
997/* INIT_LIST_HEAD(&GlobalServerList);*/ /* BB not implemented yet */ 993/* INIT_LIST_HEAD(&GlobalServerList);*/ /* BB not implemented yet */
998 INIT_LIST_HEAD(&GlobalSMBSessionList); 994 INIT_LIST_HEAD(&GlobalSMBSessionList);
999 INIT_LIST_HEAD(&GlobalTreeConnectionList); 995 INIT_LIST_HEAD(&GlobalTreeConnectionList);
@@ -1094,19 +1090,15 @@ init_cifs(void)
1094 out_destroy_inodecache: 1090 out_destroy_inodecache:
1095 cifs_destroy_inodecache(); 1091 cifs_destroy_inodecache();
1096 out_clean_proc: 1092 out_clean_proc:
1097#ifdef CONFIG_PROC_FS
1098 cifs_proc_clean(); 1093 cifs_proc_clean();
1099#endif
1100 return rc; 1094 return rc;
1101} 1095}
1102 1096
1103static void __exit 1097static void __exit
1104exit_cifs(void) 1098exit_cifs(void)
1105{ 1099{
1106 cFYI(0, ("exit_cifs")); 1100 cFYI(DBG2, ("exit_cifs"));
1107#ifdef CONFIG_PROC_FS
1108 cifs_proc_clean(); 1101 cifs_proc_clean();
1109#endif
1110#ifdef CONFIG_CIFS_DFS_UPCALL 1102#ifdef CONFIG_CIFS_DFS_UPCALL
1111 unregister_key_type(&key_type_dns_resolver); 1103 unregister_key_type(&key_type_dns_resolver);
1112#endif 1104#endif
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h
index 6355ff841f3..50f3eede93b 100644
--- a/fs/cifs/cifsproto.h
+++ b/fs/cifs/cifsproto.h
@@ -102,9 +102,13 @@ extern int mode_to_acl(struct inode *inode, const char *path, __u64);
102extern int cifs_mount(struct super_block *, struct cifs_sb_info *, char *, 102extern int cifs_mount(struct super_block *, struct cifs_sb_info *, char *,
103 const char *); 103 const char *);
104extern int cifs_umount(struct super_block *, struct cifs_sb_info *); 104extern int cifs_umount(struct super_block *, struct cifs_sb_info *);
105#ifdef CONFIG_CIFS_DFS_UPCALL 105#ifdef CONFIG_CIFS_DFS
106extern void dfs_shrink_umount_helper(struct vfsmount *vfsmnt); 106extern void dfs_shrink_umount_helper(struct vfsmount *vfsmnt);
107#endif 107#else
108static inline void dfs_shrink_umount_helper(struct vfsmount *vfsmnt)
109{
110}
111#endif /* DFS_UPCALL */
108void cifs_proc_init(void); 112void cifs_proc_init(void);
109void cifs_proc_clean(void); 113void cifs_proc_clean(void);
110 114
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 4b69d1cea65..30bbe448e26 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -602,7 +602,7 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses)
602 server->maxBuf = min(le32_to_cpu(pSMBr->MaxBufferSize), 602 server->maxBuf = min(le32_to_cpu(pSMBr->MaxBufferSize),
603 (__u32) CIFSMaxBufSize + MAX_CIFS_HDR_SIZE); 603 (__u32) CIFSMaxBufSize + MAX_CIFS_HDR_SIZE);
604 server->maxRw = le32_to_cpu(pSMBr->MaxRawSize); 604 server->maxRw = le32_to_cpu(pSMBr->MaxRawSize);
605 cFYI(0, ("Max buf = %d", ses->server->maxBuf)); 605 cFYI(DBG2, ("Max buf = %d", ses->server->maxBuf));
606 GETU32(ses->server->sessid) = le32_to_cpu(pSMBr->SessionKey); 606 GETU32(ses->server->sessid) = le32_to_cpu(pSMBr->SessionKey);
607 server->capabilities = le32_to_cpu(pSMBr->Capabilities); 607 server->capabilities = le32_to_cpu(pSMBr->Capabilities);
608 server->timeAdj = (int)(__s16)le16_to_cpu(pSMBr->ServerTimeZone); 608 server->timeAdj = (int)(__s16)le16_to_cpu(pSMBr->ServerTimeZone);
@@ -1108,9 +1108,7 @@ PsxCreat:
1108 /* check to make sure response data is there */ 1108 /* check to make sure response data is there */
1109 if (psx_rsp->ReturnedLevel != cpu_to_le16(SMB_QUERY_FILE_UNIX_BASIC)) { 1109 if (psx_rsp->ReturnedLevel != cpu_to_le16(SMB_QUERY_FILE_UNIX_BASIC)) {
1110 pRetData->Type = cpu_to_le32(-1); /* unknown */ 1110 pRetData->Type = cpu_to_le32(-1); /* unknown */
1111#ifdef CONFIG_CIFS_DEBUG2 1111 cFYI(DBG2, ("unknown type"));
1112 cFYI(1, ("unknown type"));
1113#endif
1114 } else { 1112 } else {
1115 if (pSMBr->ByteCount < sizeof(OPEN_PSX_RSP) 1113 if (pSMBr->ByteCount < sizeof(OPEN_PSX_RSP)
1116 + sizeof(FILE_UNIX_BASIC_INFO)) { 1114 + sizeof(FILE_UNIX_BASIC_INFO)) {
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 65d0ba72e78..5ccd8b710cc 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -1753,9 +1753,8 @@ void reset_cifs_unix_caps(int xid, struct cifsTconInfo *tcon,
1753 if (sb && (CIFS_SB(sb)->rsize > 127 * 1024)) { 1753 if (sb && (CIFS_SB(sb)->rsize > 127 * 1024)) {
1754 if ((cap & CIFS_UNIX_LARGE_READ_CAP) == 0) { 1754 if ((cap & CIFS_UNIX_LARGE_READ_CAP) == 0) {
1755 CIFS_SB(sb)->rsize = 127 * 1024; 1755 CIFS_SB(sb)->rsize = 127 * 1024;
1756#ifdef CONFIG_CIFS_DEBUG2 1756 cFYI(DBG2,
1757 cFYI(1, ("larger reads not supported by srv")); 1757 ("larger reads not supported by srv"));
1758#endif
1759 } 1758 }
1760 } 1759 }
1761 1760
@@ -2227,9 +2226,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
2227 2226
2228 if ((tcon->unix_ext == 0) && (cifs_sb->rsize > (1024 * 127))) { 2227 if ((tcon->unix_ext == 0) && (cifs_sb->rsize > (1024 * 127))) {
2229 cifs_sb->rsize = 1024 * 127; 2228 cifs_sb->rsize = 1024 * 127;
2230#ifdef CONFIG_CIFS_DEBUG2 2229 cFYI(DBG2,
2231 cFYI(1, ("no very large read support, rsize now 127K")); 2230 ("no very large read support, rsize now 127K"));
2232#endif
2233 } 2231 }
2234 if (!(tcon->ses->capabilities & CAP_LARGE_WRITE_X)) 2232 if (!(tcon->ses->capabilities & CAP_LARGE_WRITE_X))
2235 cifs_sb->wsize = min(cifs_sb->wsize, 2233 cifs_sb->wsize = min(cifs_sb->wsize,
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 983557d12b0..fa849c91d32 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -499,9 +499,8 @@ int cifs_close(struct inode *inode, struct file *file)
499 the struct would be in each open file, 499 the struct would be in each open file,
500 but this should give enough time to 500 but this should give enough time to
501 clear the socket */ 501 clear the socket */
502#ifdef CONFIG_CIFS_DEBUG2 502 cFYI(DBG2,
503 cFYI(1, ("close delay, write pending")); 503 ("close delay, write pending"));
504#endif /* DEBUG2 */
505 msleep(timeout); 504 msleep(timeout);
506 timeout *= 4; 505 timeout *= 4;
507 } 506 }
@@ -1812,9 +1811,7 @@ static int cifs_readpages(struct file *file, struct address_space *mapping,
1812 pTcon = cifs_sb->tcon; 1811 pTcon = cifs_sb->tcon;
1813 1812
1814 pagevec_init(&lru_pvec, 0); 1813 pagevec_init(&lru_pvec, 0);
1815#ifdef CONFIG_CIFS_DEBUG2 1814 cFYI(DBG2, ("rpages: num pages %d", num_pages));
1816 cFYI(1, ("rpages: num pages %d", num_pages));
1817#endif
1818 for (i = 0; i < num_pages; ) { 1815 for (i = 0; i < num_pages; ) {
1819 unsigned contig_pages; 1816 unsigned contig_pages;
1820 struct page *tmp_page; 1817 struct page *tmp_page;
@@ -1847,10 +1844,8 @@ static int cifs_readpages(struct file *file, struct address_space *mapping,
1847 /* Read size needs to be in multiples of one page */ 1844 /* Read size needs to be in multiples of one page */
1848 read_size = min_t(const unsigned int, read_size, 1845 read_size = min_t(const unsigned int, read_size,
1849 cifs_sb->rsize & PAGE_CACHE_MASK); 1846 cifs_sb->rsize & PAGE_CACHE_MASK);
1850#ifdef CONFIG_CIFS_DEBUG2 1847 cFYI(DBG2, ("rpages: read size 0x%x contiguous pages %d",
1851 cFYI(1, ("rpages: read size 0x%x contiguous pages %d",
1852 read_size, contig_pages)); 1848 read_size, contig_pages));
1853#endif
1854 rc = -EAGAIN; 1849 rc = -EAGAIN;
1855 while (rc == -EAGAIN) { 1850 while (rc == -EAGAIN) {
1856 if ((open_file->invalidHandle) && 1851 if ((open_file->invalidHandle) &&
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index ec26c6aa642..6020add1515 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -837,9 +837,7 @@ static void posix_fill_in_inode(struct inode *tmp_inode,
837 cFYI(1, ("unknown inode type %d", type)); 837 cFYI(1, ("unknown inode type %d", type));
838 } 838 }
839 839
840#ifdef CONFIG_CIFS_DEBUG2 840 cFYI(DBG2, ("object type: %d", type));
841 cFYI(1, ("object type: %d", type));
842#endif
843 tmp_inode->i_uid = le64_to_cpu(pData->Uid); 841 tmp_inode->i_uid = le64_to_cpu(pData->Uid);
844 tmp_inode->i_gid = le64_to_cpu(pData->Gid); 842 tmp_inode->i_gid = le64_to_cpu(pData->Gid);
845 tmp_inode->i_nlink = le64_to_cpu(pData->Nlinks); 843 tmp_inode->i_nlink = le64_to_cpu(pData->Nlinks);
diff --git a/fs/cifs/netmisc.c b/fs/cifs/netmisc.c
index 7c51e2e9a9f..3b5a5ce882b 100644
--- a/fs/cifs/netmisc.c
+++ b/fs/cifs/netmisc.c
@@ -150,9 +150,7 @@ static int canonicalize_unc(char *cp)
150 if (cp[i] == '\\') 150 if (cp[i] == '\\')
151 break; 151 break;
152 if (cp[i] == '/') { 152 if (cp[i] == '/') {
153#ifdef CONFIG_CIFS_DEBUG2 153 cFYI(DBG2, ("change slash to \\ in malformed UNC"));
154 cFYI(1, ("change slash to backslash in malformed UNC"));
155#endif
156 cp[i] = '\\'; 154 cp[i] = '\\';
157 return 1; 155 return 1;
158 } 156 }
@@ -178,9 +176,7 @@ cifs_inet_pton(int address_family, char *cp, void *dst)
178 } else if (address_family == AF_INET6) { 176 } else if (address_family == AF_INET6) {
179 ret = in6_pton(cp, -1 /* len */, dst , '\\', NULL); 177 ret = in6_pton(cp, -1 /* len */, dst , '\\', NULL);
180 } 178 }
181#ifdef CONFIG_CIFS_DEBUG2 179 cFYI(DBG2, ("address conversion returned %d for %s", ret, cp));
182 cFYI(1, ("address conversion returned %d for %s", ret, cp));
183#endif
184 if (ret > 0) 180 if (ret > 0)
185 ret = 1; 181 ret = 1;
186 return ret; 182 return ret;
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
index 89aae6cb32f..32b445edc88 100644
--- a/fs/cifs/readdir.c
+++ b/fs/cifs/readdir.c
@@ -50,6 +50,10 @@ static void dump_cifs_file_struct(struct file *file, char *label)
50 cFYI(1, ("empty dir")); 50 cFYI(1, ("empty dir"));
51 } 51 }
52} 52}
53#else
54static inline void dump_cifs_file_struct(struct file *file, char *label)
55{
56}
53#endif /* DEBUG2 */ 57#endif /* DEBUG2 */
54 58
55/* Returns one if new inode created (which therefore needs to be hashed) */ 59/* Returns one if new inode created (which therefore needs to be hashed) */
@@ -660,9 +664,7 @@ static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon,
660 . and .. for the root of a drive and for those we need 664 . and .. for the root of a drive and for those we need
661 to start two entries earlier */ 665 to start two entries earlier */
662 666
663#ifdef CONFIG_CIFS_DEBUG2
664 dump_cifs_file_struct(file, "In fce "); 667 dump_cifs_file_struct(file, "In fce ");
665#endif
666 if (((index_to_find < cifsFile->srch_inf.index_of_last_entry) && 668 if (((index_to_find < cifsFile->srch_inf.index_of_last_entry) &&
667 is_dir_changed(file)) || 669 is_dir_changed(file)) ||
668 (index_to_find < first_entry_in_buffer)) { 670 (index_to_find < first_entry_in_buffer)) {
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
index d2153abcba6..ed150efbe27 100644
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -417,10 +417,6 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, int first_time,
417 417
418 calc_lanman_hash(ses, lnm_session_key); 418 calc_lanman_hash(ses, lnm_session_key);
419 ses->flags |= CIFS_SES_LANMAN; 419 ses->flags |= CIFS_SES_LANMAN;
420/* #ifdef CONFIG_CIFS_DEBUG2
421 cifs_dump_mem("cryptkey: ",ses->server->cryptKey,
422 CIFS_SESS_KEY_SIZE);
423#endif */
424 memcpy(bcc_ptr, (char *)lnm_session_key, CIFS_SESS_KEY_SIZE); 420 memcpy(bcc_ptr, (char *)lnm_session_key, CIFS_SESS_KEY_SIZE);
425 bcc_ptr += CIFS_SESS_KEY_SIZE; 421 bcc_ptr += CIFS_SESS_KEY_SIZE;
426 422
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
index 48cdab0e70e..3612d6c0a0b 100644
--- a/fs/cifs/transport.c
+++ b/fs/cifs/transport.c
@@ -437,9 +437,8 @@ SendReceiveNoRsp(const unsigned int xid, struct cifsSesInfo *ses,
437 iov[0].iov_len = in_buf->smb_buf_length + 4; 437 iov[0].iov_len = in_buf->smb_buf_length + 4;
438 flags |= CIFS_NO_RESP; 438 flags |= CIFS_NO_RESP;
439 rc = SendReceive2(xid, ses, iov, 1, &resp_buf_type, flags); 439 rc = SendReceive2(xid, ses, iov, 1, &resp_buf_type, flags);
440#ifdef CONFIG_CIFS_DEBUG2 440 cFYI(DBG2, ("SendRcvNoRsp flags %d rc %d", flags, rc));
441 cFYI(1, ("SendRcvNoR flags %d rc %d", flags, rc)); 441
442#endif
443 return rc; 442 return rc;
444} 443}
445 444