LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 1/4] fs/cifs - Pass cifs_sb->mnt_cifs_flags instead of cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR
@ 2008-03-20  1:11 Joe Perches
  2008-03-20  1:11 ` [PATCH 2/4] fs/cifs - Use bool Joe Perches
  0 siblings, 1 reply; 5+ messages in thread
From: Joe Perches @ 2008-03-20  1:11 UTC (permalink / raw)
  To: linux-kernel; +Cc: Steve French, linux-cifs-client, samba-technical


Signed-off-by: Joe Perches <joe@perches.com>
---
 fs/cifs/cifs_dfs_ref.c |    4 +-
 fs/cifs/cifsacl.c      |   10 ++--
 fs/cifs/cifsproto.h    |   71 +++++++++++----------------
 fs/cifs/cifssmb.c      |  124 +++++++++++++++++++++++++----------------------
 fs/cifs/connect.c      |   11 ++--
 fs/cifs/dir.c          |   60 +++++++++++------------
 fs/cifs/fcntl.c        |    7 ++-
 fs/cifs/file.c         |   18 +++----
 fs/cifs/inode.c        |  124 +++++++++++++++++++-----------------------------
 fs/cifs/link.c         |   16 ++----
 fs/cifs/misc.c         |    4 +-
 fs/cifs/readdir.c      |    5 +-
 fs/cifs/xattr.c        |   56 ++++++++++-----------
 13 files changed, 233 insertions(+), 277 deletions(-)

diff --git a/fs/cifs/cifs_dfs_ref.c b/fs/cifs/cifs_dfs_ref.c
index 7f88382..453b1de 100644
--- a/fs/cifs/cifs_dfs_ref.c
+++ b/fs/cifs/cifs_dfs_ref.c
@@ -325,8 +325,8 @@ cifs_dfs_follow_mountpoint(struct dentry *dentry, struct nameidata *nd)
 	}
 
 	rc = get_dfs_path(xid, ses , full_path, cifs_sb->local_nls,
-		&num_referrals, &referrals,
-		cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
+			  &num_referrals, &referrals,
+			  cifs_sb->mnt_cifs_flags);
 
 	for (i = 0; i < num_referrals; i++) {
 		dump_referral(referrals+i);
diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c
index f93932c..4fb75af 100644
--- a/fs/cifs/cifsacl.c
+++ b/fs/cifs/cifsacl.c
@@ -588,9 +588,8 @@ static struct cifs_ntsd *get_cifs_acl(u32 *pacllen, struct inode *inode,
 		int oplock = FALSE;
 		/* open file */
 		rc = CIFSSMBOpen(xid, cifs_sb->tcon, path, FILE_OPEN,
-				READ_CONTROL, 0, &fid, &oplock, NULL,
-				cifs_sb->local_nls, cifs_sb->mnt_cifs_flags &
-					CIFS_MOUNT_MAP_SPECIAL_CHR);
+				 READ_CONTROL, 0, &fid, &oplock, NULL,
+				 cifs_sb->local_nls, cifs_sb->mnt_cifs_flags);
 		if (rc != 0) {
 			cERROR(1, ("Unable to open file to get ACL"));
 			FreeXid(xid);
@@ -641,9 +640,8 @@ static int set_cifs_acl(struct cifs_ntsd *pnntsd, __u32 acllen,
 		int oplock = FALSE;
 		/* open file */
 		rc = CIFSSMBOpen(xid, cifs_sb->tcon, path, FILE_OPEN,
-				WRITE_DAC, 0, &fid, &oplock, NULL,
-				cifs_sb->local_nls, cifs_sb->mnt_cifs_flags &
-					CIFS_MOUNT_MAP_SPECIAL_CHR);
+				 WRITE_DAC, 0, &fid, &oplock, NULL,
+				 cifs_sb->local_nls, cifs_sb->mnt_cifs_flags);
 		if (rc != 0) {
 			cERROR(1, ("Unable to open file to set ACL"));
 			FreeXid(xid);
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h
index 0af63e6..eaec2fd 100644
--- a/fs/cifs/cifsproto.h
+++ b/fs/cifs/cifsproto.h
@@ -123,7 +123,7 @@ extern int CIFSTCon(unsigned int xid, struct cifsSesInfo *ses,
 extern int CIFSFindFirst(const int xid, struct cifsTconInfo *tcon,
 		const char *searchName, const struct nls_table *nls_codepage,
 		__u16 *searchHandle, struct cifs_search_info *psrch_inf,
-		int map, const char dirsep);
+		int cifs_flags, const char dirsep);
 
 extern int CIFSFindNext(const int xid, struct cifsTconInfo *tcon,
 		__u16 searchHandle, struct cifs_search_info *psrch_inf);
@@ -135,33 +135,32 @@ extern int CIFSSMBQPathInfo(const int xid, struct cifsTconInfo *tcon,
 			const unsigned char *searchName,
 			FILE_ALL_INFO * findData,
 			int legacy /* whether to use old info level */,
-			const struct nls_table *nls_codepage, int remap);
+			const struct nls_table *nls_codepage, int cifs_flags);
 extern int SMBQueryInformation(const int xid, struct cifsTconInfo *tcon,
 			const unsigned char *searchName,
 			FILE_ALL_INFO *findData,
-			const struct nls_table *nls_codepage, int remap);
+			const struct nls_table *nls_codepage, int cifs_flags);
 
 extern int CIFSSMBUnixQPathInfo(const int xid,
 			struct cifsTconInfo *tcon,
 			const unsigned char *searchName,
 			FILE_UNIX_BASIC_INFO * pFindData,
-			const struct nls_table *nls_codepage, int remap);
+			const struct nls_table *nls_codepage, int cifs_flags);
 
 extern int CIFSGetDFSRefer(const int xid, struct cifsSesInfo *ses,
 			const unsigned char *searchName,
 			unsigned char **targetUNCs,
 			unsigned int *number_of_UNC_in_array,
-			const struct nls_table *nls_codepage, int remap);
+			const struct nls_table *nls_codepage, int cifs_flags);
 
 extern int connect_to_dfs_path(int xid, struct cifsSesInfo *pSesInfo,
 			const char *old_path,
-			const struct nls_table *nls_codepage, int remap);
+			const struct nls_table *nls_codepage, int cifs_flags);
 extern int get_dfs_path(int xid, struct cifsSesInfo *pSesInfo,
 			const char *old_path,
 			const struct nls_table *nls_codepage,
 			unsigned int *pnum_referrals,
-			struct dfs_info3_param **preferrals,
-			int remap);
+			struct dfs_info3_param **preferrals, int cifs_flags);
 extern void reset_cifs_unix_caps(int xid, struct cifsTconInfo *tcon,
 				 struct super_block *sb, struct smb_vol *vol);
 extern int CIFSSMBQFSInfo(const int xid, struct cifsTconInfo *tcon,
@@ -180,8 +179,7 @@ extern int CIFSSMBQFSPosixInfo(const int xid, struct cifsTconInfo *tcon,
 
 extern int CIFSSMBSetTimes(const int xid, struct cifsTconInfo *tcon,
 			const char *fileName, const FILE_BASIC_INFO *data,
-			const struct nls_table *nls_codepage,
-			int remap_special_chars);
+			const struct nls_table *nls_codepage, int cifs_flags);
 extern int CIFSSMBSetFileTimes(const int xid, struct cifsTconInfo *tcon,
 			const FILE_BASIC_INFO *data, __u16 fid);
 #if 0
@@ -192,50 +190,41 @@ extern int CIFSSMBSetAttrLegacy(int xid, struct cifsTconInfo *tcon,
 extern int CIFSSMBSetEOF(const int xid, struct cifsTconInfo *tcon,
 			const char *fileName, __u64 size,
 			int setAllocationSizeFlag,
-			const struct nls_table *nls_codepage,
-			int remap_special_chars);
+			const struct nls_table *nls_codepage, int cifs_flags);
 extern int CIFSSMBSetFileSize(const int xid, struct cifsTconInfo *tcon,
 			 __u64 size, __u16 fileHandle, __u32 opener_pid,
 			int AllocSizeFlag);
 extern int CIFSSMBUnixSetPerms(const int xid, struct cifsTconInfo *pTcon,
 			char *full_path, __u64 mode, __u64 uid,
 			__u64 gid, dev_t dev,
-			const struct nls_table *nls_codepage,
-			int remap_special_chars);
+			const struct nls_table *nls_codepage, int cifs_flags);
 
 extern int CIFSSMBMkDir(const int xid, struct cifsTconInfo *tcon,
 			const char *newName,
-			const struct nls_table *nls_codepage,
-			int remap_special_chars);
+			const struct nls_table *nls_codepage, int cifs_flags);
 extern int CIFSSMBRmDir(const int xid, struct cifsTconInfo *tcon,
 			const char *name, const struct nls_table *nls_codepage,
-			int remap_special_chars);
+			int cifs_flags);
 extern int CIFSPOSIXDelFile(const int xid, struct cifsTconInfo *tcon,
 			const char *name, __u16 type,
-			const struct nls_table *nls_codepage,
-			int remap_special_chars);
+			const struct nls_table *nls_codepage, int cifs_flags);
 extern int CIFSSMBDelFile(const int xid, struct cifsTconInfo *tcon,
 			const char *name,
-			const struct nls_table *nls_codepage,
-			int remap_special_chars);
+			const struct nls_table *nls_codepage, int cifs_flags);
 extern int CIFSSMBRename(const int xid, struct cifsTconInfo *tcon,
 			const char *fromName, const char *toName,
-			const struct nls_table *nls_codepage,
-			int remap_special_chars);
+			const struct nls_table *nls_codepage, int cifs_flags);
 extern int CIFSSMBRenameOpenFile(const int xid, struct cifsTconInfo *pTcon,
 			int netfid, char *target_name,
-			const struct nls_table *nls_codepage,
-			int remap_special_chars);
+			const struct nls_table *nls_codepage, int cifs_flags);
 extern int CIFSCreateHardLink(const int xid,
 			struct cifsTconInfo *tcon,
 			const char *fromName, const char *toName,
-			const struct nls_table *nls_codepage,
-			int remap_special_chars);
+			const struct nls_table *nls_codepage, int cifs_flags);
 extern int CIFSUnixCreateHardLink(const int xid,
 			struct cifsTconInfo *tcon,
 			const char *fromName, const char *toName,
-			const struct nls_table *nls_codepage,
-			int remap_special_chars);
+			const struct nls_table *nls_codepage, int cifs_flags);
 extern int CIFSUnixCreateSymLink(const int xid,
 			struct cifsTconInfo *tcon,
 			const char *fromName, const char *toName,
@@ -255,17 +244,17 @@ extern int CIFSSMBOpen(const int xid, struct cifsTconInfo *tcon,
 			const char *fileName, const int disposition,
 			const int access_flags, const int omode,
 			__u16 *netfid, int *pOplock, FILE_ALL_INFO *,
-			const struct nls_table *nls_codepage, int remap);
+			const struct nls_table *nls_codepage, int cifs_flags);
 extern int SMBLegacyOpen(const int xid, struct cifsTconInfo *tcon,
 			const char *fileName, const int disposition,
 			const int access_flags, const int omode,
 			__u16 *netfid, int *pOplock, FILE_ALL_INFO *,
-			const struct nls_table *nls_codepage, int remap);
+			const struct nls_table *nls_codepage, int cifs_flags);
 extern int CIFSPOSIXCreate(const int xid, struct cifsTconInfo *tcon,
 			u32 posix_flags, __u64 mode, __u16 *netfid,
 			FILE_UNIX_BASIC_INFO *pRetData,
 			__u32 *pOplock, const char *name,
-			const struct nls_table *nls_codepage, int remap);
+			const struct nls_table *nls_codepage, int cifs_flags);
 extern int CIFSSMBClose(const int xid, struct cifsTconInfo *tcon,
 			const int smb_file_id);
 
@@ -284,12 +273,11 @@ extern int CIFSSMBWrite2(const int xid, struct cifsTconInfo *tcon,
 			struct kvec *iov, const int nvec, const int long_op);
 extern int CIFSGetSrvInodeNumber(const int xid, struct cifsTconInfo *tcon,
 			const unsigned char *searchName, __u64 *inode_number,
-			const struct nls_table *nls_codepage,
-			int remap_special_chars);
+			const struct nls_table *nls_codepage, int cifs_flags);
 extern int cifs_convertUCSpath(char *target, const __le16 *source, int maxlen,
 			const struct nls_table *codepage);
 extern int cifsConvertToUCS(__le16 *target, const char *source, int maxlen,
-			const struct nls_table *cp, int mapChars);
+			const struct nls_table *cp, int cifs_flags);
 
 extern int CIFSSMBLock(const int xid, struct cifsTconInfo *tcon,
 			const __u16 netfid, const __u64 len,
@@ -329,8 +317,7 @@ extern int CIFSSMBCopy(int xid,
 			const char *fromName,
 			const __u16 target_tid,
 			const char *toName, const int flags,
-			const struct nls_table *nls_codepage,
-			int remap_special_chars);
+			const struct nls_table *nls_codepage, int cifs_flags);
 extern int CIFSSMBNotify(const int xid, struct cifsTconInfo *tcon,
 			const int notify_subdirs, const __u16 netfid,
 			__u32 filter, struct file *file, int multishot,
@@ -338,15 +325,15 @@ extern int CIFSSMBNotify(const int xid, struct cifsTconInfo *tcon,
 extern ssize_t CIFSSMBQAllEAs(const int xid, struct cifsTconInfo *tcon,
 			const unsigned char *searchName, char *EAData,
 			size_t bufsize, const struct nls_table *nls_codepage,
-			int remap_special_chars);
+			int cifs_flags);
 extern ssize_t CIFSSMBQueryEA(const int xid, struct cifsTconInfo *tcon,
 		const unsigned char *searchName, const unsigned char *ea_name,
 		unsigned char *ea_value, size_t buf_size,
-		const struct nls_table *nls_codepage, int remap_special_chars);
+		const struct nls_table *nls_codepage, int cifs_flags);
 extern int CIFSSMBSetEA(const int xid, struct cifsTconInfo *tcon,
 		const char *fileName, const char *ea_name,
 		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 cifs_flags);
 extern int CIFSSMBGetCIFSACL(const int xid, struct cifsTconInfo *tcon,
 			__u16 fid, struct cifs_ntsd **acl_inf, __u32 *buflen);
 extern int CIFSSMBSetCIFSACL(const int, struct cifsTconInfo *, __u16,
@@ -354,11 +341,11 @@ extern int CIFSSMBSetCIFSACL(const int, struct cifsTconInfo *, __u16,
 extern int CIFSSMBGetPosixACL(const int xid, struct cifsTconInfo *tcon,
 		const unsigned char *searchName,
 		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 cifs_flags);
 extern int CIFSSMBSetPosixACL(const int xid, struct cifsTconInfo *tcon,
 		const unsigned char *fileName,
 		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 cifs_flags);
 extern int CIFSGetExtAttr(const int xid, struct cifsTconInfo *tcon,
 			const int netfid, __u64 *pExtAttrBits, __u64 *pMask);
 #endif			/* _CIFSPROTO_H */
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 30bbe44..222387c 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -809,7 +809,8 @@ CIFSSMBLogoff(const int xid, struct cifsSesInfo *ses)
 
 int
 CIFSPOSIXDelFile(const int xid, struct cifsTconInfo *tcon, const char *fileName,
-		 __u16 type, const struct nls_table *nls_codepage, int remap)
+		 __u16 type, const struct nls_table *nls_codepage,
+		 int cifs_flags)
 {
 	TRANSACTION2_SPI_REQ *pSMB = NULL;
 	TRANSACTION2_SPI_RSP *pSMBr = NULL;
@@ -829,7 +830,7 @@ PsxDelete:
 	if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) {
 		name_len =
 		    cifsConvertToUCS((__le16 *) pSMB->FileName, fileName,
-				     PATH_MAX, nls_codepage, remap);
+				     PATH_MAX, nls_codepage, cifs_flags);
 		name_len++;	/* trailing null */
 		name_len *= 2;
 	} else { /* BB add path length overrun check */
@@ -884,7 +885,7 @@ PsxDelete:
 
 int
 CIFSSMBDelFile(const int xid, struct cifsTconInfo *tcon, const char *fileName,
-	       const struct nls_table *nls_codepage, int remap)
+	       const struct nls_table *nls_codepage, int cifs_flags)
 {
 	DELETE_FILE_REQ *pSMB = NULL;
 	DELETE_FILE_RSP *pSMBr = NULL;
@@ -901,7 +902,7 @@ DelFileRetry:
 	if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) {
 		name_len =
 		    cifsConvertToUCS((__le16 *) pSMB->fileName, fileName,
-				     PATH_MAX, nls_codepage, remap);
+				     PATH_MAX, nls_codepage, cifs_flags);
 		name_len++;	/* trailing null */
 		name_len *= 2;
 	} else {		/* BB improve check for buffer overruns BB */
@@ -929,7 +930,7 @@ DelFileRetry:
 
 int
 CIFSSMBRmDir(const int xid, struct cifsTconInfo *tcon, const char *dirName,
-	     const struct nls_table *nls_codepage, int remap)
+	     const struct nls_table *nls_codepage, int cifs_flags)
 {
 	DELETE_DIRECTORY_REQ *pSMB = NULL;
 	DELETE_DIRECTORY_RSP *pSMBr = NULL;
@@ -946,7 +947,7 @@ RmDirRetry:
 
 	if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) {
 		name_len = cifsConvertToUCS((__le16 *) pSMB->DirName, dirName,
-					 PATH_MAX, nls_codepage, remap);
+					 PATH_MAX, nls_codepage, cifs_flags);
 		name_len++;	/* trailing null */
 		name_len *= 2;
 	} else {		/* BB improve check for buffer overruns BB */
@@ -972,7 +973,8 @@ RmDirRetry:
 
 int
 CIFSSMBMkDir(const int xid, struct cifsTconInfo *tcon,
-	     const char *name, const struct nls_table *nls_codepage, int remap)
+	     const char *name, const struct nls_table *nls_codepage,
+	     int cifs_flags)
 {
 	int rc = 0;
 	CREATE_DIRECTORY_REQ *pSMB = NULL;
@@ -989,7 +991,7 @@ MkDirRetry:
 
 	if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) {
 		name_len = cifsConvertToUCS((__le16 *) pSMB->DirName, name,
-					    PATH_MAX, nls_codepage, remap);
+					    PATH_MAX, nls_codepage, cifs_flags);
 		name_len++;	/* trailing null */
 		name_len *= 2;
 	} else {		/* BB improve check for buffer overruns BB */
@@ -1017,7 +1019,7 @@ int
 CIFSPOSIXCreate(const int xid, struct cifsTconInfo *tcon, __u32 posix_flags,
 		__u64 mode, __u16 *netfid, FILE_UNIX_BASIC_INFO *pRetData,
 		__u32 *pOplock, const char *name,
-		const struct nls_table *nls_codepage, int remap)
+		const struct nls_table *nls_codepage, int cifs_flags)
 {
 	TRANSACTION2_SPI_REQ *pSMB = NULL;
 	TRANSACTION2_SPI_RSP *pSMBr = NULL;
@@ -1038,7 +1040,7 @@ PsxCreat:
 	if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) {
 		name_len =
 		    cifsConvertToUCS((__le16 *) pSMB->FileName, name,
-				     PATH_MAX, nls_codepage, remap);
+				     PATH_MAX, nls_codepage, cifs_flags);
 		name_len++;	/* trailing null */
 		name_len *= 2;
 	} else {	/* BB improve the check for buffer overruns BB */
@@ -1167,7 +1169,7 @@ SMBLegacyOpen(const int xid, struct cifsTconInfo *tcon,
 	    const char *fileName, const int openDisposition,
 	    const int access_flags, const int create_options, __u16 *netfid,
 	    int *pOplock, FILE_ALL_INFO *pfile_info,
-	    const struct nls_table *nls_codepage, int remap)
+	    const struct nls_table *nls_codepage, int cifs_flags)
 {
 	int rc = -EACCES;
 	OPENX_REQ *pSMB = NULL;
@@ -1188,7 +1190,8 @@ OldOpenRetry:
 		count = 1;      /* account for one byte pad to word boundary */
 		name_len =
 		   cifsConvertToUCS((__le16 *) (pSMB->fileName + 1),
-				    fileName, PATH_MAX, nls_codepage, remap);
+				    fileName, PATH_MAX,
+				    nls_codepage, cifs_flags);
 		name_len++;     /* trailing null */
 		name_len *= 2;
 	} else {                /* BB improve check for buffer overruns BB */
@@ -1282,7 +1285,7 @@ CIFSSMBOpen(const int xid, struct cifsTconInfo *tcon,
 	    const char *fileName, const int openDisposition,
 	    const int access_flags, const int create_options, __u16 *netfid,
 	    int *pOplock, FILE_ALL_INFO *pfile_info,
-	    const struct nls_table *nls_codepage, int remap)
+	    const struct nls_table *nls_codepage, int cifs_flags)
 {
 	int rc = -EACCES;
 	OPEN_REQ *pSMB = NULL;
@@ -1303,7 +1306,8 @@ openRetry:
 		count = 1;	/* account for one byte pad to word boundary */
 		name_len =
 		    cifsConvertToUCS((__le16 *) (pSMB->fileName + 1),
-				     fileName, PATH_MAX, nls_codepage, remap);
+				     fileName, PATH_MAX,
+				     nls_codepage, cifs_flags);
 		name_len++;	/* trailing null */
 		name_len *= 2;
 		pSMB->NameLength = cpu_to_le16(name_len);
@@ -1913,7 +1917,7 @@ CIFSSMBClose(const int xid, struct cifsTconInfo *tcon, int smb_file_id)
 int
 CIFSSMBRename(const int xid, struct cifsTconInfo *tcon,
 	      const char *fromName, const char *toName,
-	      const struct nls_table *nls_codepage, int remap)
+	      const struct nls_table *nls_codepage, int cifs_flags)
 {
 	int rc = 0;
 	RENAME_REQ *pSMB = NULL;
@@ -1937,7 +1941,7 @@ renameRetry:
 	if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) {
 		name_len =
 		    cifsConvertToUCS((__le16 *) pSMB->OldFileName, fromName,
-				     PATH_MAX, nls_codepage, remap);
+				     PATH_MAX, nls_codepage, cifs_flags);
 		name_len++;	/* trailing null */
 		name_len *= 2;
 		pSMB->OldFileName[name_len] = 0x04;	/* pad */
@@ -1945,7 +1949,7 @@ renameRetry:
 		pSMB->OldFileName[name_len + 1] = 0x00;
 		name_len2 =
 		    cifsConvertToUCS((__le16 *) &pSMB->OldFileName[name_len + 2],
-				     toName, PATH_MAX, nls_codepage, remap);
+				     toName, PATH_MAX, nls_codepage, cifs_flags);
 		name_len2 += 1 /* trailing null */  + 1 /* Signature word */ ;
 		name_len2 *= 2;	/* convert to bytes */
 	} else {	/* BB improve the check for buffer overruns BB */
@@ -1980,7 +1984,7 @@ renameRetry:
 
 int CIFSSMBRenameOpenFile(const int xid, struct cifsTconInfo *pTcon,
 		int netfid, char *target_name,
-		const struct nls_table *nls_codepage, int remap)
+		const struct nls_table *nls_codepage, int cifs_flags)
 {
 	struct smb_com_transaction2_sfi_req *pSMB  = NULL;
 	struct smb_com_transaction2_sfi_rsp *pSMBr = NULL;
@@ -2026,11 +2030,12 @@ int CIFSSMBRenameOpenFile(const int xid, struct cifsTconInfo *pTcon,
 	if (target_name == NULL) {
 		sprintf(dummy_string, "cifs%x", pSMB->hdr.Mid);
 		len_of_str = cifsConvertToUCS((__le16 *)rename_info->target_name,
-					dummy_string, 24, nls_codepage, remap);
+					      dummy_string, 24,
+					      nls_codepage, cifs_flags);
 	} else {
 		len_of_str = cifsConvertToUCS((__le16 *)rename_info->target_name,
-					target_name, PATH_MAX, nls_codepage,
-					remap);
+					      target_name, PATH_MAX,
+					      nls_codepage, cifs_flags);
 	}
 	rename_info->target_name_len = cpu_to_le32(2 * len_of_str);
 	count = 12 /* sizeof(struct set_file_rename) */ + (2 * len_of_str) + 2;
@@ -2060,7 +2065,7 @@ int CIFSSMBRenameOpenFile(const int xid, struct cifsTconInfo *pTcon,
 int
 CIFSSMBCopy(const int xid, struct cifsTconInfo *tcon, const char *fromName,
 	    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 cifs_flags)
 {
 	int rc = 0;
 	COPY_REQ *pSMB = NULL;
@@ -2084,7 +2089,7 @@ copyRetry:
 	if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) {
 		name_len = cifsConvertToUCS((__le16 *) pSMB->OldFileName,
 					    fromName, PATH_MAX, nls_codepage,
-					    remap);
+					    cifs_flags);
 		name_len++;     /* trailing null */
 		name_len *= 2;
 		pSMB->OldFileName[name_len] = 0x04;     /* pad */
@@ -2092,7 +2097,7 @@ copyRetry:
 		pSMB->OldFileName[name_len + 1] = 0x00;
 		name_len2 =
 		    cifsConvertToUCS((__le16 *)&pSMB->OldFileName[name_len + 2],
-				toName, PATH_MAX, nls_codepage, remap);
+				toName, PATH_MAX, nls_codepage, cifs_flags);
 		name_len2 += 1 /* trailing null */  + 1 /* Signature word */ ;
 		name_len2 *= 2; /* convert to bytes */
 	} else { 	/* BB improve the check for buffer overruns BB */
@@ -2219,7 +2224,7 @@ createSymLinkRetry:
 int
 CIFSUnixCreateHardLink(const int xid, struct cifsTconInfo *tcon,
 		       const char *fromName, const char *toName,
-		       const struct nls_table *nls_codepage, int remap)
+		       const struct nls_table *nls_codepage, int cifs_flags)
 {
 	TRANSACTION2_SPI_REQ *pSMB = NULL;
 	TRANSACTION2_SPI_RSP *pSMBr = NULL;
@@ -2239,7 +2244,7 @@ createHardLinkRetry:
 
 	if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) {
 		name_len = cifsConvertToUCS((__le16 *) pSMB->FileName, toName,
-					    PATH_MAX, nls_codepage, remap);
+					    PATH_MAX, nls_codepage, cifs_flags);
 		name_len++;	/* trailing null */
 		name_len *= 2;
 
@@ -2262,7 +2267,7 @@ createHardLinkRetry:
 	if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) {
 		name_len_target =
 		    cifsConvertToUCS((__le16 *) data_offset, fromName, PATH_MAX,
-				     nls_codepage, remap);
+				     nls_codepage, cifs_flags);
 		name_len_target++;	/* trailing null */
 		name_len_target *= 2;
 	} else {	/* BB improve the check for buffer overruns BB */
@@ -2304,7 +2309,7 @@ createHardLinkRetry:
 int
 CIFSCreateHardLink(const int xid, struct cifsTconInfo *tcon,
 		   const char *fromName, const char *toName,
-		   const struct nls_table *nls_codepage, int remap)
+		   const struct nls_table *nls_codepage, int cifs_flags)
 {
 	int rc = 0;
 	NT_RENAME_REQ *pSMB = NULL;
@@ -2332,14 +2337,15 @@ winCreateHardLinkRetry:
 	if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) {
 		name_len =
 		    cifsConvertToUCS((__le16 *) pSMB->OldFileName, fromName,
-				     PATH_MAX, nls_codepage, remap);
+				     PATH_MAX, nls_codepage, cifs_flags);
 		name_len++;	/* trailing null */
 		name_len *= 2;
 		pSMB->OldFileName[name_len] = 0;	/* pad */
 		pSMB->OldFileName[name_len + 1] = 0x04;
 		name_len2 =
 		    cifsConvertToUCS((__le16 *)&pSMB->OldFileName[name_len + 2],
-				     toName, PATH_MAX, nls_codepage, remap);
+				     toName, PATH_MAX,
+				     nls_codepage, cifs_flags);
 		name_len2 += 1 /* trailing null */  + 1 /* Signature word */ ;
 		name_len2 *= 2;	/* convert to bytes */
 	} else {	/* BB improve the check for buffer overruns BB */
@@ -2807,7 +2813,7 @@ int
 CIFSSMBGetPosixACL(const int xid, struct cifsTconInfo *tcon,
 		   const unsigned char *searchName,
 		   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 cifs_flags)
 {
 /* SMB_QUERY_POSIX_ACL */
 	TRANSACTION2_QPI_REQ *pSMB = NULL;
@@ -2828,7 +2834,7 @@ queryAclRetry:
 	if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) {
 		name_len =
 			cifsConvertToUCS((__le16 *) pSMB->FileName, searchName,
-					 PATH_MAX, nls_codepage, remap);
+					 PATH_MAX, nls_codepage, cifs_flags);
 		name_len++;     /* trailing null */
 		name_len *= 2;
 		pSMB->FileName[name_len] = 0;
@@ -2896,7 +2902,7 @@ CIFSSMBSetPosixACL(const int xid, struct cifsTconInfo *tcon,
 		   const unsigned char *fileName,
 		   const char *local_acl, const int buflen,
 		   const int acl_type,
-		   const struct nls_table *nls_codepage, int remap)
+		   const struct nls_table *nls_codepage, int cifs_flags)
 {
 	struct smb_com_transaction2_spi_req *pSMB = NULL;
 	struct smb_com_transaction2_spi_rsp *pSMBr = NULL;
@@ -2915,7 +2921,7 @@ setAclRetry:
 	if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) {
 		name_len =
 			cifsConvertToUCS((__le16 *) pSMB->FileName, fileName,
-				      PATH_MAX, nls_codepage, remap);
+				      PATH_MAX, nls_codepage, cifs_flags);
 		name_len++;     /* trailing null */
 		name_len *= 2;
 	} else {	/* BB improve the check for buffer overruns BB */
@@ -3218,7 +3224,7 @@ setCifsAclRetry:
 int SMBQueryInformation(const int xid, struct cifsTconInfo *tcon,
 			const unsigned char *searchName,
 			FILE_ALL_INFO *pFinfo,
-			const struct nls_table *nls_codepage, int remap)
+			const struct nls_table *nls_codepage, int cifs_flags)
 {
 	QUERY_INFORMATION_REQ *pSMB;
 	QUERY_INFORMATION_RSP *pSMBr;
@@ -3236,7 +3242,7 @@ QInfRetry:
 	if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) {
 		name_len =
 			cifsConvertToUCS((__le16 *) pSMB->FileName, searchName,
-					PATH_MAX, nls_codepage, remap);
+					PATH_MAX, nls_codepage, cifs_flags);
 		name_len++;     /* trailing null */
 		name_len *= 2;
 	} else {
@@ -3290,7 +3296,7 @@ CIFSSMBQPathInfo(const int xid, struct cifsTconInfo *tcon,
 		 const unsigned char *searchName,
 		 FILE_ALL_INFO *pFindData,
 		 int legacy /* old style infolevel */,
-		 const struct nls_table *nls_codepage, int remap)
+		 const struct nls_table *nls_codepage, int cifs_flags)
 {
 /* level 263 SMB_QUERY_FILE_ALL_INFO */
 	TRANSACTION2_QPI_REQ *pSMB = NULL;
@@ -3310,7 +3316,7 @@ QPathInfoRetry:
 	if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) {
 		name_len =
 		    cifsConvertToUCS((__le16 *) pSMB->FileName, searchName,
-				     PATH_MAX, nls_codepage, remap);
+				     PATH_MAX, nls_codepage, cifs_flags);
 		name_len++;	/* trailing null */
 		name_len *= 2;
 	} else {	/* BB improve the check for buffer overruns BB */
@@ -3389,7 +3395,7 @@ int
 CIFSSMBUnixQPathInfo(const int xid, struct cifsTconInfo *tcon,
 		     const unsigned char *searchName,
 		     FILE_UNIX_BASIC_INFO * pFindData,
-		     const struct nls_table *nls_codepage, int remap)
+		     const struct nls_table *nls_codepage, int cifs_flags)
 {
 /* SMB_QUERY_FILE_UNIX_BASIC */
 	TRANSACTION2_QPI_REQ *pSMB = NULL;
@@ -3409,7 +3415,7 @@ UnixQPathInfoRetry:
 	if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) {
 		name_len =
 		    cifsConvertToUCS((__le16 *) pSMB->FileName, searchName,
-				  PATH_MAX, nls_codepage, remap);
+				  PATH_MAX, nls_codepage, cifs_flags);
 		name_len++;	/* trailing null */
 		name_len *= 2;
 	} else {	/* BB improve the check for buffer overruns BB */
@@ -3476,7 +3482,8 @@ CIFSFindFirst(const int xid, struct cifsTconInfo *tcon,
 	      const char *searchName,
 	      const struct nls_table *nls_codepage,
 	      __u16 *pnetfid,
-	      struct cifs_search_info *psrch_inf, int remap, const char dirsep)
+	      struct cifs_search_info *psrch_inf, int cifs_flags,
+	      const char dirsep)
 {
 /* level 257 SMB_ */
 	TRANSACTION2_FFIRST_REQ *pSMB = NULL;
@@ -3498,7 +3505,7 @@ findFirstRetry:
 	if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) {
 		name_len =
 		    cifsConvertToUCS((__le16 *) pSMB->FileName, searchName,
-				 PATH_MAX, nls_codepage, remap);
+				 PATH_MAX, nls_codepage, cifs_flags);
 		/* We can not add the asterik earlier in case
 		it got remapped to 0xF03A as if it were part of the
 		directory name instead of a wildcard */
@@ -3767,7 +3774,7 @@ int
 CIFSGetSrvInodeNumber(const int xid, struct cifsTconInfo *tcon,
 		      const unsigned char *searchName,
 		      __u64 *inode_number,
-		      const struct nls_table *nls_codepage, int remap)
+		      const struct nls_table *nls_codepage, int cifs_flags)
 {
 	int rc = 0;
 	TRANSACTION2_QPI_REQ *pSMB = NULL;
@@ -3788,7 +3795,7 @@ GetInodeNumberRetry:
 	if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) {
 		name_len =
 			cifsConvertToUCS((__le16 *) pSMB->FileName, searchName,
-					 PATH_MAX, nls_codepage, remap);
+					 PATH_MAX, nls_codepage, cifs_flags);
 		name_len++;     /* trailing null */
 		name_len *= 2;
 	} else {	/* BB improve the check for buffer overruns BB */
@@ -3861,7 +3868,7 @@ CIFSGetDFSRefer(const int xid, struct cifsSesInfo *ses,
 		const unsigned char *searchName,
 		unsigned char **targetUNCs,
 		unsigned int *number_of_UNC_in_array,
-		const struct nls_table *nls_codepage, int remap)
+		const struct nls_table *nls_codepage, int cifs_flags)
 {
 /* TRANS2_GET_DFS_REFERRAL */
 	TRANSACTION2_GET_DFS_REFER_REQ *pSMB = NULL;
@@ -3899,7 +3906,8 @@ getDFSRetry:
 		pSMB->hdr.Flags2 |= SMBFLG2_UNICODE;
 		name_len =
 		    cifsConvertToUCS((__le16 *) pSMB->RequestFileName,
-				     searchName, PATH_MAX, nls_codepage, remap);
+				     searchName, PATH_MAX,
+				     nls_codepage, cifs_flags);
 		name_len++;	/* trailing null */
 		name_len *= 2;
 	} else {	/* BB improve the check for buffer overruns BB */
@@ -4583,7 +4591,7 @@ QFSPosixRetry:
 int
 CIFSSMBSetEOF(const int xid, struct cifsTconInfo *tcon, const char *fileName,
 	      __u64 size, int SetAllocation,
-	      const struct nls_table *nls_codepage, int remap)
+	      const struct nls_table *nls_codepage, int cifs_flags)
 {
 	struct smb_com_transaction2_spi_req *pSMB = NULL;
 	struct smb_com_transaction2_spi_rsp *pSMBr = NULL;
@@ -4603,7 +4611,7 @@ SetEOFRetry:
 	if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) {
 		name_len =
 		    cifsConvertToUCS((__le16 *) pSMB->FileName, fileName,
-				     PATH_MAX, nls_codepage, remap);
+				     PATH_MAX, nls_codepage, cifs_flags);
 		name_len++;	/* trailing null */
 		name_len *= 2;
 	} else {	/* BB improve the check for buffer overruns BB */
@@ -4823,7 +4831,7 @@ CIFSSMBSetFileTimes(const int xid, struct cifsTconInfo *tcon,
 int
 CIFSSMBSetTimes(const int xid, struct cifsTconInfo *tcon, const char *fileName,
 		const FILE_BASIC_INFO *data,
-		const struct nls_table *nls_codepage, int remap)
+		const struct nls_table *nls_codepage, int cifs_flags)
 {
 	TRANSACTION2_SPI_REQ *pSMB = NULL;
 	TRANSACTION2_SPI_RSP *pSMBr = NULL;
@@ -4844,7 +4852,7 @@ SetTimesRetry:
 	if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) {
 		name_len =
 		    cifsConvertToUCS((__le16 *) pSMB->FileName, fileName,
-				     PATH_MAX, nls_codepage, remap);
+				     PATH_MAX, nls_codepage, cifs_flags);
 		name_len++;	/* trailing null */
 		name_len *= 2;
 	} else {	/* BB improve the check for buffer overruns BB */
@@ -4954,7 +4962,7 @@ int
 CIFSSMBUnixSetPerms(const int xid, struct cifsTconInfo *tcon,
 		    char *fileName, __u64 mode, __u64 uid, __u64 gid,
 		    dev_t device, const struct nls_table *nls_codepage,
-		    int remap)
+		    int cifs_flags)
 {
 	TRANSACTION2_SPI_REQ *pSMB = NULL;
 	TRANSACTION2_SPI_RSP *pSMBr = NULL;
@@ -4974,7 +4982,7 @@ setPermsRetry:
 	if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) {
 		name_len =
 		    cifsConvertToUCS((__le16 *) pSMB->FileName, fileName,
-				     PATH_MAX, nls_codepage, remap);
+				     PATH_MAX, nls_codepage, cifs_flags);
 		name_len++;	/* trailing null */
 		name_len *= 2;
 	} else {	/* BB improve the check for buffer overruns BB */
@@ -5135,7 +5143,7 @@ ssize_t
 CIFSSMBQAllEAs(const int xid, struct cifsTconInfo *tcon,
 		 const unsigned char *searchName,
 		 char *EAData, size_t buf_size,
-		 const struct nls_table *nls_codepage, int remap)
+		 const struct nls_table *nls_codepage, int cifs_flags)
 {
 		/* BB assumes one setup word */
 	TRANSACTION2_QPI_REQ *pSMB = NULL;
@@ -5157,7 +5165,7 @@ QAllEAsRetry:
 	if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) {
 		name_len =
 		    cifsConvertToUCS((__le16 *) pSMB->FileName, searchName,
-				     PATH_MAX, nls_codepage, remap);
+				     PATH_MAX, nls_codepage, cifs_flags);
 		name_len++;	/* trailing null */
 		name_len *= 2;
 	} else {	/* BB improve the check for buffer overruns BB */
@@ -5284,7 +5292,7 @@ QAllEAsRetry:
 ssize_t CIFSSMBQueryEA(const int xid, struct cifsTconInfo *tcon,
 		const unsigned char *searchName, const unsigned char *ea_name,
 		unsigned char *ea_value, size_t buf_size,
-		const struct nls_table *nls_codepage, int remap)
+		const struct nls_table *nls_codepage, int cifs_flags)
 {
 	TRANSACTION2_QPI_REQ *pSMB = NULL;
 	TRANSACTION2_QPI_RSP *pSMBr = NULL;
@@ -5305,7 +5313,7 @@ QEARetry:
 	if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) {
 		name_len =
 		    cifsConvertToUCS((__le16 *) pSMB->FileName, searchName,
-				     PATH_MAX, nls_codepage, remap);
+				     PATH_MAX, nls_codepage, cifs_flags);
 		name_len++;	/* trailing null */
 		name_len *= 2;
 	} else {	/* BB improve the check for buffer overruns BB */
@@ -5434,7 +5442,7 @@ int
 CIFSSMBSetEA(const int xid, struct cifsTconInfo *tcon, const char *fileName,
 	     const char *ea_name, const void *ea_value,
 	     const __u16 ea_value_len, const struct nls_table *nls_codepage,
-	     int remap)
+	     int cifs_flags)
 {
 	struct smb_com_transaction2_spi_req *pSMB = NULL;
 	struct smb_com_transaction2_spi_rsp *pSMBr = NULL;
@@ -5454,7 +5462,7 @@ SetEARetry:
 	if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) {
 		name_len =
 		    cifsConvertToUCS((__le16 *) pSMB->FileName, fileName,
-				     PATH_MAX, nls_codepage, remap);
+				     PATH_MAX, nls_codepage, cifs_flags);
 		name_len++;	/* trailing null */
 		name_len *= 2;
 	} else {	/* BB improve the check for buffer overruns BB */
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 8dbfa97..a951c63 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -1408,14 +1408,14 @@ find_unc(__be32 new_target_ip_addr, char *uncName, char *userName)
 int
 connect_to_dfs_path(int xid, struct cifsSesInfo *pSesInfo,
 		    const char *old_path, const struct nls_table *nls_codepage,
-		    int remap)
+		    int cifs_flags)
 {
 	struct dfs_info3_param *referrals = NULL;
 	unsigned int num_referrals;
 	int rc = 0;
 
 	rc = get_dfs_path(xid, pSesInfo, old_path, nls_codepage,
-			&num_referrals, &referrals, remap);
+			&num_referrals, &referrals, cifs_flags);
 
 	/* BB Add in code to: if valid refrl, if not ip address contact
 		the helper that resolves tcp names, mount to it, try to
@@ -1429,7 +1429,7 @@ connect_to_dfs_path(int xid, struct cifsSesInfo *pSesInfo,
 int
 get_dfs_path(int xid, struct cifsSesInfo *pSesInfo, const char *old_path,
 	     const struct nls_table *nls_codepage, unsigned int *pnum_referrals,
-	     struct dfs_info3_param **preferrals, int remap)
+	     struct dfs_info3_param **preferrals, int cifs_flags)
 {
 	char *temp_unc;
 	int rc = 0;
@@ -1457,7 +1457,7 @@ get_dfs_path(int xid, struct cifsSesInfo *pSesInfo, const char *old_path,
 	}
 	if (rc == 0)
 		rc = CIFSGetDFSRefer(xid, pSesInfo, old_path, &targetUNCs,
-				     pnum_referrals, nls_codepage, remap);
+				     pnum_referrals, nls_codepage, cifs_flags);
 	/* BB map targetUNCs to dfs_info3 structures, here or
 		in CIFSGetDFSRefer BB */
 
@@ -2149,8 +2149,7 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
 					NULL)) {
 					rc = connect_to_dfs_path(xid, pSesInfo,
 						"", cifs_sb->local_nls,
-						cifs_sb->mnt_cifs_flags &
-						  CIFS_MOUNT_MAP_SPECIAL_CHR);
+						cifs_sb->mnt_cifs_flags);
 					rc = -ENODEV;
 					goto out;
 				} else {
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index 4e83b47..15fe3b4 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -178,18 +178,19 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
 	}
 	if (cifs_sb->tcon->ses->capabilities & CAP_NT_SMBS)
 		rc = CIFSSMBOpen(xid, pTcon, full_path, disposition,
-			 desiredAccess, CREATE_NOT_DIR,
-			 &fileHandle, &oplock, buf, cifs_sb->local_nls,
-			 cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
+				 desiredAccess, CREATE_NOT_DIR,
+				 &fileHandle, &oplock, buf, cifs_sb->local_nls,
+				 cifs_sb->mnt_cifs_flags);
 	else
 		rc = -EIO; /* no NT SMB support fall into legacy open below */
 
 	if (rc == -EIO) {
 		/* old server, retry the open legacy style */
 		rc = SMBLegacyOpen(xid, pTcon, full_path, disposition,
-			desiredAccess, CREATE_NOT_DIR,
-			&fileHandle, &oplock, buf, cifs_sb->local_nls,
-			cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
+				   desiredAccess, CREATE_NOT_DIR,
+				   &fileHandle, &oplock, buf,
+				   cifs_sb->local_nls,
+				   cifs_sb->mnt_cifs_flags);
 	}
 	if (rc) {
 		cFYI(1, ("cifs_create returned 0x%x", rc));
@@ -200,20 +201,18 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
 			mode &= ~current->fs->umask;
 			if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) {
 				CIFSSMBUnixSetPerms(xid, pTcon, full_path, mode,
-					(__u64)current->fsuid,
-					(__u64)current->fsgid,
-					0 /* dev */,
-					cifs_sb->local_nls,
-					cifs_sb->mnt_cifs_flags &
-						CIFS_MOUNT_MAP_SPECIAL_CHR);
+						    (__u64)current->fsuid,
+						    (__u64)current->fsgid,
+						    0 /* dev */,
+						    cifs_sb->local_nls,
+						    cifs_sb->mnt_cifs_flags);
 			} else {
 				CIFSSMBUnixSetPerms(xid, pTcon, full_path, mode,
-					(__u64)-1,
-					(__u64)-1,
-					0 /* dev */,
-					cifs_sb->local_nls,
-					cifs_sb->mnt_cifs_flags &
-						CIFS_MOUNT_MAP_SPECIAL_CHR);
+						    (__u64)-1,
+						    (__u64)-1,
+						    0 /* dev */,
+						    cifs_sb->local_nls,
+						    cifs_sb->mnt_cifs_flags);
 			}
 		} else {
 			/* BB implement mode setting via Windows security
@@ -328,18 +327,18 @@ int cifs_mknod(struct inode *inode, struct dentry *direntry, int mode,
 	else if (pTcon->unix_ext) {
 		mode &= ~current->fs->umask;
 		if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) {
-			rc = CIFSSMBUnixSetPerms(xid, pTcon, full_path,
-				mode, (__u64)current->fsuid,
-				(__u64)current->fsgid,
-				device_number, cifs_sb->local_nls,
-				cifs_sb->mnt_cifs_flags &
-					CIFS_MOUNT_MAP_SPECIAL_CHR);
+			rc = CIFSSMBUnixSetPerms(xid, pTcon, full_path, mode,
+						 (__u64)current->fsuid,
+						 (__u64)current->fsgid,
+						 device_number,
+						 cifs_sb->local_nls,
+						 cifs_sb->mnt_cifs_flags);
 		} else {
-			rc = CIFSSMBUnixSetPerms(xid, pTcon,
-				full_path, mode, (__u64)-1, (__u64)-1,
-				device_number, cifs_sb->local_nls,
-				cifs_sb->mnt_cifs_flags &
-					CIFS_MOUNT_MAP_SPECIAL_CHR);
+			rc = CIFSSMBUnixSetPerms(xid, pTcon, full_path, mode,
+						 (__u64)-1, (__u64)-1,
+						 device_number,
+						 cifs_sb->local_nls,
+						 cifs_sb->mnt_cifs_flags);
 		}
 
 		if (!rc) {
@@ -376,8 +375,7 @@ int cifs_mknod(struct inode *inode, struct dentry *direntry, int mode,
 					 CREATE_NOT_DIR | CREATE_OPTION_SPECIAL,
 					 &fileHandle, &oplock, buf,
 					 cifs_sb->local_nls,
-					 cifs_sb->mnt_cifs_flags &
-					    CIFS_MOUNT_MAP_SPECIAL_CHR);
+					 cifs_sb->mnt_cifs_flags);
 
 			/* BB FIXME - add handling for backlevel servers
 			   which need legacy open and check for all
diff --git a/fs/cifs/fcntl.c b/fs/cifs/fcntl.c
index 7d1d5aa..d345b0b 100644
--- a/fs/cifs/fcntl.c
+++ b/fs/cifs/fcntl.c
@@ -89,9 +89,10 @@ int cifs_dir_notify(struct file *file, unsigned long arg)
 	} else {
 		cFYI(1, ("dir notify on file %s Arg 0x%lx", full_path, arg));
 		rc = CIFSSMBOpen(xid, pTcon, full_path, FILE_OPEN,
-			GENERIC_READ | SYNCHRONIZE, 0 /* create options */,
-			&netfid, &oplock, NULL, cifs_sb->local_nls,
-			cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
+				 GENERIC_READ | SYNCHRONIZE,
+				 0 /* create options */,
+				 &netfid, &oplock, NULL, cifs_sb->local_nls,
+				 cifs_sb->mnt_cifs_flags);
 		/* BB fixme - add this handle to a notify handle list */
 		if (rc) {
 			cFYI(1, ("Could not open directory for notify"));
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index fa849c9..b0e7795 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -266,18 +266,18 @@ int cifs_open(struct inode *inode, struct file *file)
 
 	if (cifs_sb->tcon->ses->capabilities & CAP_NT_SMBS)
 		rc = CIFSSMBOpen(xid, pTcon, full_path, disposition,
-			 desiredAccess, CREATE_NOT_DIR, &netfid, &oplock, buf,
-			 cifs_sb->local_nls, cifs_sb->mnt_cifs_flags
-				 & CIFS_MOUNT_MAP_SPECIAL_CHR);
+				 desiredAccess, CREATE_NOT_DIR,
+				 &netfid, &oplock, buf,
+				 cifs_sb->local_nls, cifs_sb->mnt_cifs_flags);
 	else
 		rc = -EIO; /* no NT SMB support fall into legacy open below */
 
 	if (rc == -EIO) {
 		/* Old server, try legacy style OpenX */
 		rc = SMBLegacyOpen(xid, pTcon, full_path, disposition,
-			desiredAccess, CREATE_NOT_DIR, &netfid, &oplock, buf,
-			cifs_sb->local_nls, cifs_sb->mnt_cifs_flags
-				& CIFS_MOUNT_MAP_SPECIAL_CHR);
+				   desiredAccess, CREATE_NOT_DIR,
+				   &netfid, &oplock, buf,
+				   cifs_sb->local_nls, cifs_sb->mnt_cifs_flags);
 	}
 	if (rc) {
 		cFYI(1, ("cifs_open returned 0x%x", rc));
@@ -310,8 +310,7 @@ int cifs_open(struct inode *inode, struct file *file)
 					    inode->i_mode,
 					    (__u64)-1, (__u64)-1, 0 /* dev */,
 					    cifs_sb->local_nls,
-					    cifs_sb->mnt_cifs_flags &
-						CIFS_MOUNT_MAP_SPECIAL_CHR);
+					    cifs_sb->mnt_cifs_flags);
 		} else {
 			/* BB implement via Windows security descriptors eg
 			   CIFSSMBWinSetPerms(xid, pTcon, full_path, mode,
@@ -414,8 +413,7 @@ reopen_error_exit:
 
 	rc = CIFSSMBOpen(xid, pTcon, full_path, disposition, desiredAccess,
 			 CREATE_NOT_DIR, &netfid, &oplock, NULL,
-			 cifs_sb->local_nls, cifs_sb->mnt_cifs_flags &
-				CIFS_MOUNT_MAP_SPECIAL_CHR);
+			 cifs_sb->local_nls, cifs_sb->mnt_cifs_flags);
 	if (rc) {
 		up(&pCifsFile->fh_sem);
 		cFYI(1, ("cifs_open returned 0x%x", rc));
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 24eb4d3..13c728f 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -167,8 +167,7 @@ int cifs_get_inode_info_unix(struct inode **pinode,
 	cFYI(1, ("Getting info on %s", search_path));
 	/* could have done a find first instead but this returns more info */
 	rc = CIFSSMBUnixQPathInfo(xid, pTcon, search_path, &findData,
-				  cifs_sb->local_nls, cifs_sb->mnt_cifs_flags &
-					CIFS_MOUNT_MAP_SPECIAL_CHR);
+				  cifs_sb->local_nls, cifs_sb->mnt_cifs_flags);
 /*	dump_mem("\nUnixQPathInfo return data", &findData,
 		 sizeof(findData)); */
 	if (rc) {
@@ -188,8 +187,7 @@ int cifs_get_inode_info_unix(struct inode **pinode,
 			rc = connect_to_dfs_path(xid, pTcon->ses,
 						 /* treename + */ tmp_path,
 						 cifs_sb->local_nls,
-						 cifs_sb->mnt_cifs_flags &
-						    CIFS_MOUNT_MAP_SPECIAL_CHR);
+						 cifs_sb->mnt_cifs_flags);
 			kfree(tmp_path);
 
 			/* BB fix up inode etc. */
@@ -266,8 +264,7 @@ static int decode_sfu_inode(struct inode *inode, __u64 size,
 	rc = CIFSSMBOpen(xid, pTcon, path, FILE_OPEN, GENERIC_READ,
 			 CREATE_NOT_DIR, &netfid, &oplock, NULL,
 			 cifs_sb->local_nls,
-			 cifs_sb->mnt_cifs_flags &
-				CIFS_MOUNT_MAP_SPECIAL_CHR);
+			 cifs_sb->mnt_cifs_flags);
 	if (rc == 0) {
 		int buf_type = CIFS_NO_BUFFER;
 			/* Read header */
@@ -326,8 +323,9 @@ static int get_sfu_mode(struct inode *inode,
 	__u32 mode;
 
 	rc = CIFSSMBQueryEA(xid, cifs_sb->tcon, path, "SETFILEBITS",
-			ea_value, 4 /* size of buf */, cifs_sb->local_nls,
-		cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
+			    ea_value, 4 /* size of buf */,
+			    cifs_sb->local_nls,
+			    cifs_sb->mnt_cifs_flags);
 	if (rc < 0)
 		return (int)rc;
 	else if (rc > 3) {
@@ -375,17 +373,16 @@ int cifs_get_inode_info(struct inode **pinode,
 		pfindData = (FILE_ALL_INFO *)buf;
 		/* could do find first instead but this returns more info */
 		rc = CIFSSMBQPathInfo(xid, pTcon, search_path, pfindData,
-			      0 /* not legacy */,
-			      cifs_sb->local_nls, cifs_sb->mnt_cifs_flags &
-				CIFS_MOUNT_MAP_SPECIAL_CHR);
+				      0 /* not legacy */,
+				      cifs_sb->local_nls,
+				      cifs_sb->mnt_cifs_flags);
 		/* BB optimize code so we do not make the above call
 		when server claims no NT SMB support and the above call
 		failed at least once - set flag in tcon or mount */
 		if ((rc == -EOPNOTSUPP) || (rc == -EINVAL)) {
 			rc = SMBQueryInformation(xid, pTcon, search_path,
-					pfindData, cifs_sb->local_nls,
-					cifs_sb->mnt_cifs_flags &
-					  CIFS_MOUNT_MAP_SPECIAL_CHR);
+						 pfindData, cifs_sb->local_nls,
+						 cifs_sb->mnt_cifs_flags);
 			adjustTZ = TRUE;
 		}
 	}
@@ -408,8 +405,7 @@ int cifs_get_inode_info(struct inode **pinode,
 			rc = connect_to_dfs_path(xid, pTcon->ses,
 						 /* treename + */ tmp_path,
 						 cifs_sb->local_nls,
-						 cifs_sb->mnt_cifs_flags &
-						   CIFS_MOUNT_MAP_SPECIAL_CHR);
+						 cifs_sb->mnt_cifs_flags);
 			kfree(tmp_path);
 			/* BB fix up inode etc. */
 		} else if (rc) {
@@ -447,10 +443,9 @@ int cifs_get_inode_info(struct inode **pinode,
 				__u64 inode_num;
 
 				rc1 = CIFSGetSrvInodeNumber(xid, pTcon,
-					search_path, &inode_num,
-					cifs_sb->local_nls,
-					cifs_sb->mnt_cifs_flags &
-						CIFS_MOUNT_MAP_SPECIAL_CHR);
+						search_path, &inode_num,
+						cifs_sb->local_nls,
+						cifs_sb->mnt_cifs_flags);
 				if (rc1) {
 					cFYI(1, ("GetSrvInodeNum rc %d", rc1));
 					/* BB EOPNOSUPP disable SERVER_INUM? */
@@ -660,15 +655,16 @@ int cifs_unlink(struct inode *inode, struct dentry *direntry)
 		(CIFS_UNIX_POSIX_PATH_OPS_CAP &
 			le64_to_cpu(pTcon->fsUnixInfo.Capability))) {
 		rc = CIFSPOSIXDelFile(xid, pTcon, full_path,
-			SMB_POSIX_UNLINK_FILE_TARGET, cifs_sb->local_nls,
-			cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
+				      SMB_POSIX_UNLINK_FILE_TARGET,
+				      cifs_sb->local_nls,
+				      cifs_sb->mnt_cifs_flags);
 		cFYI(1, ("posix del rc %d", rc));
 		if ((rc == 0) || (rc == -ENOENT))
 			goto psx_del_no_retry;
 	}
 
 	rc = CIFSSMBDelFile(xid, pTcon, full_path, cifs_sb->local_nls,
-			cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
+			    cifs_sb->mnt_cifs_flags);
 psx_del_no_retry:
 	if (!rc) {
 		if (direntry->d_inode)
@@ -682,13 +678,11 @@ psx_del_no_retry:
 		rc = CIFSSMBOpen(xid, pTcon, full_path, FILE_OPEN, DELETE,
 				 CREATE_NOT_DIR | CREATE_DELETE_ON_CLOSE,
 				 &netfid, &oplock, NULL, cifs_sb->local_nls,
-				 cifs_sb->mnt_cifs_flags &
-					CIFS_MOUNT_MAP_SPECIAL_CHR);
+				 cifs_sb->mnt_cifs_flags);
 		if (rc == 0) {
 			CIFSSMBRenameOpenFile(xid, pTcon, netfid, NULL,
 					      cifs_sb->local_nls,
-					      cifs_sb->mnt_cifs_flags &
-						CIFS_MOUNT_MAP_SPECIAL_CHR);
+					      cifs_sb->mnt_cifs_flags);
 			CIFSSMBClose(xid, pTcon, netfid);
 			if (direntry->d_inode)
 				drop_nlink(direntry->d_inode);
@@ -703,8 +697,7 @@ psx_del_no_retry:
 				rc = CIFSSMBSetTimes(xid, pTcon, full_path,
 						     pinfo_buf,
 						     cifs_sb->local_nls,
-						     cifs_sb->mnt_cifs_flags &
-							CIFS_MOUNT_MAP_SPECIAL_CHR);
+						     cifs_sb->mnt_cifs_flags);
 			else
 				rc = -EOPNOTSUPP;
 
@@ -727,8 +720,7 @@ psx_del_no_retry:
 						 FILE_WRITE_ATTRIBUTES, 0,
 						 &netfid, &oplock, NULL,
 						 cifs_sb->local_nls,
-						 cifs_sb->mnt_cifs_flags &
-						    CIFS_MOUNT_MAP_SPECIAL_CHR);
+						 cifs_sb->mnt_cifs_flags);
 				if (rc == 0) {
 					rc = CIFSSMBSetFileTimes(xid, pTcon,
 								 pinfo_buf,
@@ -741,8 +733,7 @@ psx_del_no_retry:
 		if (rc == 0) {
 			rc = CIFSSMBDelFile(xid, pTcon, full_path,
 					    cifs_sb->local_nls,
-					    cifs_sb->mnt_cifs_flags &
-						CIFS_MOUNT_MAP_SPECIAL_CHR);
+					    cifs_sb->mnt_cifs_flags);
 			if (!rc) {
 				if (direntry->d_inode)
 					drop_nlink(direntry->d_inode);
@@ -756,14 +747,12 @@ psx_del_no_retry:
 						 CREATE_DELETE_ON_CLOSE,
 						 &netfid, &oplock, NULL,
 						 cifs_sb->local_nls,
-						 cifs_sb->mnt_cifs_flags &
-						    CIFS_MOUNT_MAP_SPECIAL_CHR);
+						 cifs_sb->mnt_cifs_flags);
 				if (rc == 0) {
 					CIFSSMBRenameOpenFile(xid, pTcon,
 						netfid, NULL,
 						cifs_sb->local_nls,
-						cifs_sb->mnt_cifs_flags &
-						    CIFS_MOUNT_MAP_SPECIAL_CHR);
+						cifs_sb->mnt_cifs_flags);
 					CIFSSMBClose(xid, pTcon, netfid);
 					if (direntry->d_inode)
 						drop_nlink(direntry->d_inode);
@@ -862,10 +851,9 @@ int cifs_mkdir(struct inode *inode, struct dentry *direntry, int mode)
 
 		mode &= ~current->fs->umask;
 		rc = CIFSPOSIXCreate(xid, pTcon, SMB_O_DIRECTORY | SMB_O_CREAT,
-				mode, NULL /* netfid */, pInfo, &oplock,
-				full_path, cifs_sb->local_nls,
-				cifs_sb->mnt_cifs_flags &
-					CIFS_MOUNT_MAP_SPECIAL_CHR);
+				     mode, NULL /* netfid */, pInfo, &oplock,
+				     full_path, cifs_sb->local_nls,
+				     cifs_sb->mnt_cifs_flags);
 		if (rc == -EOPNOTSUPP) {
 			kfree(pInfo);
 			goto mkdir_retry_old;
@@ -924,7 +912,7 @@ int cifs_mkdir(struct inode *inode, struct dentry *direntry, int mode)
 mkdir_retry_old:
 	/* BB add setting the equivalent of mode via CreateX w/ACLs */
 	rc = CIFSSMBMkDir(xid, pTcon, full_path, cifs_sb->local_nls,
-			  cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
+			  cifs_sb->mnt_cifs_flags);
 	if (rc) {
 		cFYI(1, ("cifs_mkdir returned 0x%x", rc));
 		d_drop(direntry);
@@ -956,15 +944,13 @@ mkdir_get_info:
 						    (__u64)current->fsgid,
 						    0 /* dev_t */,
 						    cifs_sb->local_nls,
-						    cifs_sb->mnt_cifs_flags &
-						    CIFS_MOUNT_MAP_SPECIAL_CHR);
+						    cifs_sb->mnt_cifs_flags);
 			} else {
 				CIFSSMBUnixSetPerms(xid, pTcon, full_path,
 						    mode, (__u64)-1,
 						    (__u64)-1, 0 /* dev_t */,
 						    cifs_sb->local_nls,
-						    cifs_sb->mnt_cifs_flags &
-						    CIFS_MOUNT_MAP_SPECIAL_CHR);
+						    cifs_sb->mnt_cifs_flags);
 			}
 		} else {
 			/* BB to be implemented via Windows secrty descriptors
@@ -1012,8 +998,7 @@ int cifs_rmdir(struct inode *inode, struct dentry *direntry)
 	}
 
 	rc = CIFSSMBRmDir(xid, pTcon, full_path, cifs_sb->local_nls,
-			  cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
-
+			  cifs_sb->mnt_cifs_flags);
 	if (!rc) {
 		drop_nlink(inode);
 		spin_lock(&direntry->d_inode->i_lock);
@@ -1068,8 +1053,7 @@ int cifs_rename(struct inode *source_inode, struct dentry *source_direntry,
 
 	rc = CIFSSMBRename(xid, pTcon, fromName, toName,
 			   cifs_sb_source->local_nls,
-			   cifs_sb_source->mnt_cifs_flags &
-				CIFS_MOUNT_MAP_SPECIAL_CHR);
+			   cifs_sb_source->mnt_cifs_flags);
 	if (rc == -EEXIST) {
 		/* check if they are the same file because rename of hardlinked
 		   files is a noop */
@@ -1084,8 +1068,7 @@ int cifs_rename(struct inode *source_inode, struct dentry *source_direntry,
 				rc = CIFSSMBUnixQPathInfo(xid, pTcon, fromName,
 					info_buf_source,
 					cifs_sb_source->local_nls,
-					cifs_sb_source->mnt_cifs_flags &
-						CIFS_MOUNT_MAP_SPECIAL_CHR);
+					cifs_sb_source->mnt_cifs_flags);
 			/* else rc is still EEXIST so will fall through to
 			   unlink the target and retry rename */
 			if (rc == 0) {
@@ -1093,8 +1076,7 @@ int cifs_rename(struct inode *source_inode, struct dentry *source_direntry,
 						info_buf_target,
 						cifs_sb_target->local_nls,
 						/* remap based on source sb */
-						cifs_sb_source->mnt_cifs_flags &
-						    CIFS_MOUNT_MAP_SPECIAL_CHR);
+						cifs_sb_source->mnt_cifs_flags);
 			}
 			if ((rc == 0) &&
 			    (info_buf_source->UniqueId ==
@@ -1109,10 +1091,9 @@ int cifs_rename(struct inode *source_inode, struct dentry *source_direntry,
 			   semantics */
 				cifs_unlink(target_inode, target_direntry);
 				rc = CIFSSMBRename(xid, pTcon, fromName,
-						   toName,
-						   cifs_sb_source->local_nls,
-						   cifs_sb_source->mnt_cifs_flags
-						   & CIFS_MOUNT_MAP_SPECIAL_CHR);
+						toName,
+						cifs_sb_source->local_nls,
+						cifs_sb_source->mnt_cifs_flags);
 			}
 			kfree(info_buf_source);
 		} /* if we can not get memory just leave rc as EEXIST */
@@ -1132,13 +1113,11 @@ int cifs_rename(struct inode *source_inode, struct dentry *source_direntry,
 		rc = CIFSSMBOpen(xid, pTcon, fromName, FILE_OPEN, GENERIC_READ,
 				 CREATE_NOT_DIR, &netfid, &oplock, NULL,
 				 cifs_sb_source->local_nls,
-				 cifs_sb_source->mnt_cifs_flags &
-					CIFS_MOUNT_MAP_SPECIAL_CHR);
+				 cifs_sb_source->mnt_cifs_flags);
 		if (rc == 0) {
 			rc = CIFSSMBRenameOpenFile(xid, pTcon, netfid, toName,
-					      cifs_sb_source->local_nls,
-					      cifs_sb_source->mnt_cifs_flags &
-						CIFS_MOUNT_MAP_SPECIAL_CHR);
+						cifs_sb_source->local_nls,
+						cifs_sb_source->mnt_cifs_flags);
 			CIFSSMBClose(xid, pTcon, netfid);
 		}
 	}
@@ -1458,8 +1437,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
 			rc = CIFSSMBSetEOF(xid, pTcon, full_path,
 					   attrs->ia_size, FALSE,
 					   cifs_sb->local_nls,
-					   cifs_sb->mnt_cifs_flags &
-						CIFS_MOUNT_MAP_SPECIAL_CHR);
+					   cifs_sb->mnt_cifs_flags);
 			cFYI(1, ("SetEOF by path (setattrs) rc = %d", rc));
 			if ((rc == -EINVAL) || (rc == -EOPNOTSUPP)) {
 				__u16 netfid;
@@ -1468,10 +1446,9 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
 				rc = SMBLegacyOpen(xid, pTcon, full_path,
 					FILE_OPEN,
 					SYNCHRONIZE | FILE_WRITE_ATTRIBUTES,
-					CREATE_NOT_DIR, &netfid, &oplock,
-					NULL, cifs_sb->local_nls,
-					cifs_sb->mnt_cifs_flags &
-						CIFS_MOUNT_MAP_SPECIAL_CHR);
+					CREATE_NOT_DIR, &netfid, &oplock, NULL,
+					cifs_sb->local_nls,
+					cifs_sb->mnt_cifs_flags);
 				if (rc == 0) {
 					unsigned int bytes_written;
 					rc = CIFSSMBWrite(xid, pTcon,
@@ -1523,8 +1500,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
 	    && (attrs->ia_valid & (ATTR_MODE | ATTR_GID | ATTR_UID)))
 		rc = CIFSSMBUnixSetPerms(xid, pTcon, full_path, mode, uid, gid,
 					 0 /* dev_t */, cifs_sb->local_nls,
-					 cifs_sb->mnt_cifs_flags &
-						CIFS_MOUNT_MAP_SPECIAL_CHR);
+					 cifs_sb->mnt_cifs_flags);
 	else if (attrs->ia_valid & ATTR_MODE) {
 		rc = 0;
 #ifdef CONFIG_CIFS_EXPERIMENTAL
@@ -1596,8 +1572,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
 		if (!(pTcon->ses->flags & CIFS_SES_NT4))
 			rc = CIFSSMBSetTimes(xid, pTcon, full_path, &time_buf,
 					     cifs_sb->local_nls,
-					     cifs_sb->mnt_cifs_flags &
-						CIFS_MOUNT_MAP_SPECIAL_CHR);
+					     cifs_sb->mnt_cifs_flags);
 		else
 			rc = -EOPNOTSUPP;
 
@@ -1613,8 +1588,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
 					 SYNCHRONIZE | FILE_WRITE_ATTRIBUTES,
 					 CREATE_NOT_DIR, &netfid, &oplock,
 					 NULL, cifs_sb->local_nls,
-					 cifs_sb->mnt_cifs_flags &
-						CIFS_MOUNT_MAP_SPECIAL_CHR);
+					 cifs_sb->mnt_cifs_flags);
 			if (rc == 0) {
 				rc = CIFSSMBSetFileTimes(xid, pTcon, &time_buf,
 							 netfid);
diff --git a/fs/cifs/link.c b/fs/cifs/link.c
index 1d6fb01..4b5ca5f 100644
--- a/fs/cifs/link.c
+++ b/fs/cifs/link.c
@@ -59,13 +59,11 @@ cifs_hardlink(struct dentry *old_file, struct inode *inode,
 	if (pTcon->unix_ext)
 		rc = CIFSUnixCreateHardLink(xid, pTcon, fromName, toName,
 					    cifs_sb_target->local_nls,
-					    cifs_sb_target->mnt_cifs_flags &
-						CIFS_MOUNT_MAP_SPECIAL_CHR);
+					    cifs_sb_target->mnt_cifs_flags);
 	else {
 		rc = CIFSCreateHardLink(xid, pTcon, fromName, toName,
 					cifs_sb_target->local_nls,
-					cifs_sb_target->mnt_cifs_flags &
-						CIFS_MOUNT_MAP_SPECIAL_CHR);
+					cifs_sb_target->mnt_cifs_flags);
 		if ((rc == -EIO) || (rc == -EINVAL))
 			rc = -EOPNOTSUPP;
 	}
@@ -281,10 +279,9 @@ cifs_readlink(struct dentry *direntry, char __user *pBuffer, int buflen)
 		/* add open and read as in fs/cifs/inode.c */
 	} else {
 		rc = CIFSSMBOpen(xid, pTcon, full_path, FILE_OPEN, GENERIC_READ,
-				OPEN_REPARSE_POINT, &fid, &oplock, NULL,
-				cifs_sb->local_nls,
-				cifs_sb->mnt_cifs_flags &
-					CIFS_MOUNT_MAP_SPECIAL_CHR);
+				 OPEN_REPARSE_POINT, &fid, &oplock, NULL,
+				 cifs_sb->local_nls,
+				 cifs_sb->mnt_cifs_flags);
 		if (!rc) {
 			rc = CIFSSMBQueryReparseLinkInfo(xid, pTcon, full_path,
 				tmpbuffer,
@@ -312,8 +309,7 @@ cifs_readlink(struct dentry *direntry, char __user *pBuffer, int buflen)
 						tmp_path,
 						cifs_sb->local_nls,
 						&num_referrals, &refs,
-						cifs_sb->mnt_cifs_flags &
-						    CIFS_MOUNT_MAP_SPECIAL_CHR);
+						cifs_sb->mnt_cifs_flags);
 					cFYI(1, ("Get DFS for %s rc = %d ",
 						tmp_path, rc));
 					if ((num_referrals == 0) && (rc == 0))
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
index 2a42d9f..cd9d977 100644
--- a/fs/cifs/misc.c
+++ b/fs/cifs/misc.c
@@ -714,14 +714,14 @@ cUCS_out:
    names are little endian 16 bit Unicode on the wire */
 int
 cifsConvertToUCS(__le16 *target, const char *source, int maxlen,
-		 const struct nls_table *cp, int mapChars)
+		 const struct nls_table *cp, int cifs_flags)
 {
 	int i, j, charlen;
 	int len_remaining = maxlen;
 	char src_char;
 	__u16 temp;
 
-	if (!mapChars)
+	if (!(cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR))
 		return cifs_strtoUCS(target, source, PATH_MAX, cp);
 
 	for (i = 0, j = 0; i < maxlen; j++) {
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
index 32b445e..38811ce 100644
--- a/fs/cifs/readdir.c
+++ b/fs/cifs/readdir.c
@@ -481,9 +481,8 @@ ffirst_retry:
 	}
 
 	rc = CIFSFindFirst(xid, pTcon, full_path, cifs_sb->local_nls,
-		&cifsFile->netfid, &cifsFile->srch_inf,
-		cifs_sb->mnt_cifs_flags &
-			CIFS_MOUNT_MAP_SPECIAL_CHR, CIFS_DIR_SEP(cifs_sb));
+			   &cifsFile->netfid, &cifsFile->srch_inf,
+			   cifs_sb->mnt_cifs_flags, CIFS_DIR_SEP(cifs_sb));
 	if (rc == 0)
 		cifsFile->invalidHandle = FALSE;
 	if ((rc == -EOPNOTSUPP) &&
diff --git a/fs/cifs/xattr.c b/fs/cifs/xattr.c
index 8cd6a44..5122683 100644
--- a/fs/cifs/xattr.c
+++ b/fs/cifs/xattr.c
@@ -83,8 +83,8 @@ int cifs_removexattr(struct dentry *direntry, const char *ea_name)
 
 		ea_name += 5; /* skip past user. prefix */
 		rc = CIFSSMBSetEA(xid, pTcon, full_path, ea_name, NULL,
-			(__u16)0, cifs_sb->local_nls,
-			cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
+				  (__u16)0, cifs_sb->local_nls,
+				  cifs_sb->mnt_cifs_flags);
 	}
 remove_ea_exit:
 	kfree(full_path);
@@ -144,16 +144,16 @@ int cifs_setxattr(struct dentry *direntry, const char *ea_name,
 
 		ea_name += 5; /* skip past user. prefix */
 		rc = CIFSSMBSetEA(xid, pTcon, full_path, ea_name, ea_value,
-			(__u16)value_size, cifs_sb->local_nls,
-			cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
+				  (__u16)value_size, cifs_sb->local_nls,
+				  cifs_sb->mnt_cifs_flags);
 	} else if (strncmp(ea_name, CIFS_XATTR_OS2_PREFIX, 4) == 0) {
 		if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
 			goto set_ea_exit;
 
 		ea_name += 4; /* skip past os2. prefix */
 		rc = CIFSSMBSetEA(xid, pTcon, full_path, ea_name, ea_value,
-			(__u16)value_size, cifs_sb->local_nls,
-			cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
+				  (__u16)value_size, cifs_sb->local_nls,
+				  cifs_sb->mnt_cifs_flags);
 	} else {
 		int temp;
 		temp = strncmp(ea_name, POSIX_ACL_XATTR_ACCESS,
@@ -164,8 +164,7 @@ int cifs_setxattr(struct dentry *direntry, const char *ea_name,
 				rc = CIFSSMBSetPosixACL(xid, pTcon, full_path,
 					ea_value, (const int)value_size,
 					ACL_TYPE_ACCESS, cifs_sb->local_nls,
-					cifs_sb->mnt_cifs_flags &
-						CIFS_MOUNT_MAP_SPECIAL_CHR);
+					cifs_sb->mnt_cifs_flags);
 			cFYI(1, ("set POSIX ACL rc %d", rc));
 #else
 			cFYI(1, ("set POSIX ACL not supported"));
@@ -177,8 +176,7 @@ int cifs_setxattr(struct dentry *direntry, const char *ea_name,
 				rc = CIFSSMBSetPosixACL(xid, pTcon, full_path,
 					ea_value, (const int)value_size,
 					ACL_TYPE_DEFAULT, cifs_sb->local_nls,
-					cifs_sb->mnt_cifs_flags &
-						CIFS_MOUNT_MAP_SPECIAL_CHR);
+					cifs_sb->mnt_cifs_flags);
 			cFYI(1, ("set POSIX default ACL rc %d", rc));
 #else
 			cFYI(1, ("set default POSIX ACL not supported"));
@@ -242,25 +240,25 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name,
 		} /* BB add else when above is implemented */
 		ea_name += 5; /* skip past user. prefix */
 		rc = CIFSSMBQueryEA(xid, pTcon, full_path, ea_name, ea_value,
-			buf_size, cifs_sb->local_nls,
-			cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
+				    buf_size, cifs_sb->local_nls,
+				    cifs_sb->mnt_cifs_flags);
 	} else if (strncmp(ea_name, CIFS_XATTR_OS2_PREFIX, 4) == 0) {
 		if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
 			goto get_ea_exit;
 
 		ea_name += 4; /* skip past os2. prefix */
 		rc = CIFSSMBQueryEA(xid, pTcon, full_path, ea_name, ea_value,
-			buf_size, cifs_sb->local_nls,
-			cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
+				    buf_size, cifs_sb->local_nls,
+				    cifs_sb->mnt_cifs_flags);
 	} else if (strncmp(ea_name, POSIX_ACL_XATTR_ACCESS,
 			  strlen(POSIX_ACL_XATTR_ACCESS)) == 0) {
 #ifdef CONFIG_CIFS_POSIX
 		if (sb->s_flags & MS_POSIXACL)
 			rc = CIFSSMBGetPosixACL(xid, pTcon, full_path,
-				ea_value, buf_size, ACL_TYPE_ACCESS,
-				cifs_sb->local_nls,
-				cifs_sb->mnt_cifs_flags &
-					CIFS_MOUNT_MAP_SPECIAL_CHR);
+						ea_value, buf_size,
+						ACL_TYPE_ACCESS,
+						cifs_sb->local_nls,
+						cifs_sb->mnt_cifs_flags);
 #ifdef CONFIG_CIFS_EXPERIMENTAL
 		else if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) {
 			__u16 fid;
@@ -269,10 +267,11 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name,
 			__u32 buflen = 0;
 			if (experimEnabled)
 				rc = CIFSSMBOpen(xid, pTcon, full_path,
-					FILE_OPEN, GENERIC_READ, 0, &fid,
-					&oplock, NULL, cifs_sb->local_nls,
-					cifs_sb->mnt_cifs_flags &
-					CIFS_MOUNT_MAP_SPECIAL_CHR);
+						 FILE_OPEN, GENERIC_READ,
+						 0, &fid,
+						 &oplock, NULL,
+						 cifs_sb->local_nls,
+						 cifs_sb->mnt_cifs_flags);
 			/* else rc is EOPNOTSUPP from above */
 
 			if (rc == 0) {
@@ -290,10 +289,10 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name,
 #ifdef CONFIG_CIFS_POSIX
 		if (sb->s_flags & MS_POSIXACL)
 			rc = CIFSSMBGetPosixACL(xid, pTcon, full_path,
-				ea_value, buf_size, ACL_TYPE_DEFAULT,
-				cifs_sb->local_nls,
-				cifs_sb->mnt_cifs_flags &
-					CIFS_MOUNT_MAP_SPECIAL_CHR);
+						ea_value, buf_size,
+						ACL_TYPE_DEFAULT,
+						cifs_sb->local_nls,
+						cifs_sb->mnt_cifs_flags);
 #else
 		cFYI(1, ("query POSIX default ACL not supported yet"));
 #endif
@@ -361,9 +360,8 @@ ssize_t cifs_listxattr(struct dentry *direntry, char *data, size_t buf_size)
 		search server for EAs or streams to
 		returns as xattrs */
 	rc = CIFSSMBQAllEAs(xid, pTcon, full_path, data, buf_size,
-				cifs_sb->local_nls,
-				cifs_sb->mnt_cifs_flags &
-					CIFS_MOUNT_MAP_SPECIAL_CHR);
+			    cifs_sb->local_nls,
+			    cifs_sb->mnt_cifs_flags);
 
 	kfree(full_path);
 	FreeXid(xid);
-- 
1.5.4.rc2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/4] fs/cifs - Use bool
  2008-03-20  1:11 [PATCH 1/4] fs/cifs - Pass cifs_sb->mnt_cifs_flags instead of cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR Joe Perches
@ 2008-03-20  1:11 ` Joe Perches
  2008-03-20  1:11   ` [PATCH 3/4] fs/cifs - Remove an indent level, use normal kthread_run arguments Joe Perches
  2008-04-29  0:07   ` [PATCH 2/4] fs/cifs - Use bool Steve French
  0 siblings, 2 replies; 5+ messages in thread
From: Joe Perches @ 2008-03-20  1:11 UTC (permalink / raw)
  To: linux-kernel; +Cc: Steve French, linux-cifs-client, samba-technical


Signed-off-by: Joe Perches <joe@perches.com>
---
 fs/cifs/asn1.c       |   10 +++---
 fs/cifs/cifsacl.c    |   16 +++++-----
 fs/cifs/cifsfs.c     |    6 ++--
 fs/cifs/cifsfs.h     |    8 -----
 fs/cifs/cifsglob.h   |   44 +++++++++++----------------
 fs/cifs/cifsproto.h  |   13 ++++----
 fs/cifs/cifssmb.c    |   38 ++++++++++++------------
 fs/cifs/connect.c    |   80 +++++++++++++++++++++++++-------------------------
 fs/cifs/dir.c        |   18 +++++-----
 fs/cifs/fcntl.c      |    2 +-
 fs/cifs/file.c       |   80 +++++++++++++++++++++++++-------------------------
 fs/cifs/inode.c      |   42 +++++++++++++-------------
 fs/cifs/link.c       |    2 +-
 fs/cifs/misc.c       |   33 ++++++++++----------
 fs/cifs/readdir.c    |   12 ++++----
 fs/cifs/smbencrypt.c |    8 ++--
 fs/cifs/xattr.c      |    2 +-
 17 files changed, 200 insertions(+), 214 deletions(-)

diff --git a/fs/cifs/asn1.c b/fs/cifs/asn1.c
index bcda2c6..cb52cbb 100644
--- a/fs/cifs/asn1.c
+++ b/fs/cifs/asn1.c
@@ -460,8 +460,8 @@ decode_negTokenInit(unsigned char *security_blob, int length,
 	unsigned char *sequence_end;
 	unsigned long *oid = NULL;
 	unsigned int cls, con, tag, oidlen, rc;
-	int use_ntlmssp = FALSE;
-	int use_kerberos = FALSE;
+	bool use_ntlmssp = false;
+	bool use_kerberos = false;
 
 	*secType = NTLM; /* BB eventually make Kerberos or NLTMSSP the default*/
 
@@ -561,15 +561,15 @@ decode_negTokenInit(unsigned char *security_blob, int length,
 					if (compare_oid(oid, oidlen,
 							MSKRB5_OID,
 							MSKRB5_OID_LEN))
-						use_kerberos = TRUE;
+						use_kerberos = true;
 					else if (compare_oid(oid, oidlen,
 							     KRB5_OID,
 							     KRB5_OID_LEN))
-						use_kerberos = TRUE;
+						use_kerberos = true;
 					else if (compare_oid(oid, oidlen,
 							     NTLMSSP_OID,
 							     NTLMSSP_OID_LEN))
-						use_ntlmssp = TRUE;
+						use_ntlmssp = true;
 
 					kfree(oid);
 				}
diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c
index 4fb75af..feb8dbb 100644
--- a/fs/cifs/cifsacl.c
+++ b/fs/cifs/cifsacl.c
@@ -559,7 +559,7 @@ static struct cifs_ntsd *get_cifs_acl(u32 *pacllen, struct inode *inode,
 				       const char *path)
 {
 	struct cifsFileInfo *open_file;
-	int unlock_file = FALSE;
+	bool unlock_file = false;
 	int xid;
 	int rc = -EIO;
 	__u16 fid;
@@ -582,10 +582,10 @@ static struct cifs_ntsd *get_cifs_acl(u32 *pacllen, struct inode *inode,
 	cifs_sb = CIFS_SB(sb);
 
 	if (open_file) {
-		unlock_file = TRUE;
+		unlock_file = true;
 		fid = open_file->netfid;
 	} else {
-		int oplock = FALSE;
+		int oplock = 0;
 		/* open file */
 		rc = CIFSSMBOpen(xid, cifs_sb->tcon, path, FILE_OPEN,
 				 READ_CONTROL, 0, &fid, &oplock, NULL,
@@ -599,7 +599,7 @@ static struct cifs_ntsd *get_cifs_acl(u32 *pacllen, struct inode *inode,
 
 	rc = CIFSSMBGetCIFSACL(xid, cifs_sb->tcon, fid, &pntsd, pacllen);
 	cFYI(1, ("GetCIFSACL rc = %d ACL len %d", rc, *pacllen));
-	if (unlock_file == TRUE)
+	if (unlock_file)
 		atomic_dec(&open_file->wrtPending);
 	else
 		CIFSSMBClose(xid, cifs_sb->tcon, fid);
@@ -613,7 +613,7 @@ static int set_cifs_acl(struct cifs_ntsd *pnntsd, __u32 acllen,
 				struct inode *inode, const char *path)
 {
 	struct cifsFileInfo *open_file;
-	int unlock_file = FALSE;
+	bool unlock_file = false;
 	int xid;
 	int rc = -EIO;
 	__u16 fid;
@@ -634,10 +634,10 @@ static int set_cifs_acl(struct cifs_ntsd *pnntsd, __u32 acllen,
 
 	open_file = find_readable_file(CIFS_I(inode));
 	if (open_file) {
-		unlock_file = TRUE;
+		unlock_file = true;
 		fid = open_file->netfid;
 	} else {
-		int oplock = FALSE;
+		int oplock = 0;
 		/* open file */
 		rc = CIFSSMBOpen(xid, cifs_sb->tcon, path, FILE_OPEN,
 				 WRITE_DAC, 0, &fid, &oplock, NULL,
@@ -651,7 +651,7 @@ static int set_cifs_acl(struct cifs_ntsd *pnntsd, __u32 acllen,
 
 	rc = CIFSSMBSetCIFSACL(xid, cifs_sb->tcon, fid, pnntsd, acllen);
 	cFYI(DBG2, ("SetCIFSACL rc = %d", rc));
-	if (unlock_file == TRUE)
+	if (unlock_file)
 		atomic_dec(&open_file->wrtPending);
 	else
 		CIFSSMBClose(xid, cifs_sb->tcon, fid);
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index a04b17e..14dceac 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -306,8 +306,8 @@ cifs_alloc_inode(struct super_block *sb)
 	/* Until the file is open and we have gotten oplock
 	info back from the server, can not assume caching of
 	file data or metadata */
-	cifs_inode->clientCanCacheRead = FALSE;
-	cifs_inode->clientCanCacheAll = FALSE;
+	cifs_inode->clientCanCacheRead = false;
+	cifs_inode->clientCanCacheAll = false;
 	cifs_inode->vfs_inode.i_blkbits = 14;  /* 2**14 = CIFS_MAX_MSGSIZE */
 
 	/* Can not set i_flags here - they get immediately overwritten
@@ -945,7 +945,7 @@ static int cifs_oplock_thread(void *dummyarg)
 				    rc = CIFSSMBLock(0, pTcon, netfid,
 					    0 /* len */ , 0 /* offset */, 0,
 					    0, LOCKING_ANDX_OPLOCK_RELEASE,
-					    0 /* wait flag */);
+					    false /* wait flag */);
 					cFYI(1, ("Oplock release rc = %d", rc));
 				}
 			} else
diff --git a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h
index 6897830..ab7246a 100644
--- a/fs/cifs/cifsfs.h
+++ b/fs/cifs/cifsfs.h
@@ -24,14 +24,6 @@
 
 #define ROOT_I 2
 
-#ifndef FALSE
-#define FALSE 0
-#endif
-
-#ifndef TRUE
-#define TRUE 1
-#endif
-
 extern struct file_system_type cifs_fs_type;
 extern const struct address_space_operations cifs_addr_ops;
 extern const struct address_space_operations cifs_addr_ops_smallbuf;
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index 69a2e19..b7d9f69 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -57,14 +57,6 @@
 
 #include "cifspdu.h"
 
-#ifndef FALSE
-#define FALSE 0
-#endif
-
-#ifndef TRUE
-#define TRUE 1
-#endif
-
 #ifndef XATTR_DOS_ATTRIB
 #define XATTR_DOS_ATTRIB "user.DOSATTRIB"
 #endif
@@ -147,7 +139,7 @@ struct TCP_Server_Info {
 	enum protocolEnum protocolType;
 	char versionMajor;
 	char versionMinor;
-	unsigned svlocal:1;	/* local server or remote */
+	bool svlocal:1;			/* local server or remote */
 	atomic_t socketUseCount; /* number of open cifs sessions on socket */
 	atomic_t inFlight;  /* number of requests on the wire to server */
 #ifdef CONFIG_CIFS_STATS2
@@ -286,10 +278,10 @@ struct cifsTconInfo {
 	FILE_SYSTEM_DEVICE_INFO fsDevInfo;
 	FILE_SYSTEM_ATTRIBUTE_INFO fsAttrInfo; /* ok if fs name truncated */
 	FILE_SYSTEM_UNIX_INFO fsUnixInfo;
-	unsigned ipc:1;		/* set if connection to IPC$ eg for RPC/PIPES */
-	unsigned retry:1;
-	unsigned nocase:1;
-	unsigned unix_ext:1; /* if off disable Linux extensions to CIFS protocol
+	bool ipc:1;		/* set if connection to IPC$ eg for RPC/PIPES */
+	bool retry:1;
+	bool nocase:1;
+	bool unix_ext:1;  /* if false disable Linux extensions to CIFS protocol
 				for this mount even if server would support */
 	/* BB add field for back pointer to sb struct(s)? */
 };
@@ -317,10 +309,10 @@ struct cifs_search_info {
 	char *srch_entries_start;
 	char *presume_name;
 	unsigned int resume_name_len;
-	unsigned endOfSearch:1;
-	unsigned emptyDir:1;
-	unsigned unicode:1;
-	unsigned smallBuf:1; /* so we know which buf_release function to call */
+	bool endOfSearch:1;
+	bool emptyDir:1;
+	bool unicode:1;
+	bool smallBuf:1; /* so we know which buf_release function to call */
 };
 
 struct cifsFileInfo {
@@ -335,9 +327,9 @@ struct cifsFileInfo {
 	struct inode *pInode; /* needed for oplock break */
 	struct mutex lock_mutex;
 	struct list_head llist; /* list of byte range locks we have. */
-	unsigned closePend:1;	/* file is marked to close */
-	unsigned invalidHandle:1;  /* file closed via session abend */
-	unsigned messageMode:1;    /* for pipes: message vs byte mode */
+	bool closePend:1;	/* file is marked to close */
+	bool invalidHandle:1;	/* file closed via session abend */
+	bool messageMode:1;	/* for pipes: message vs byte mode */
 	atomic_t wrtPending;   /* handle in use - defer close */
 	struct semaphore fh_sem; /* prevents reopen race after dead ses*/
 	char *search_resume_name; /* BB removeme BB */
@@ -356,9 +348,9 @@ struct cifsInodeInfo {
 	__u32 cifsAttrs; /* e.g. DOS archive bit, sparse, compressed, system */
 	atomic_t inUse;	 /* num concurrent users (local openers cifs) of file*/
 	unsigned long time;	/* jiffies of last update/check of inode */
-	unsigned clientCanCacheRead:1; /* read oplock */
-	unsigned clientCanCacheAll:1;  /* read and writebehind oplock */
-	unsigned oplockPending:1;
+	bool clientCanCacheRead:1;	/* read oplock */
+	bool clientCanCacheAll:1;	/* read and writebehind oplock */
+	bool oplockPending:1;
 	struct inode vfs_inode;
 };
 
@@ -426,9 +418,9 @@ struct mid_q_entry {
 	struct smb_hdr *resp_buf;	/* response buffer */
 	int midState;	/* wish this were enum but can not pass to wait_event */
 	__u8 command;	/* smb command code */
-	unsigned largeBuf:1;    /* if valid response, is pointer to large buf */
-	unsigned multiRsp:1;   /* multiple trans2 responses for one request  */
-	unsigned multiEnd:1; /* both received */
+	bool largeBuf:1;	/* if valid response, is pointer to large buf */
+	bool multiRsp:1;	/* multiple trans2 responses for one request  */
+	bool multiEnd:1;	/* both received */
 };
 
 struct oplock_q_entry {
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h
index eaec2fd..26d33d0 100644
--- a/fs/cifs/cifsproto.h
+++ b/fs/cifs/cifsproto.h
@@ -59,8 +59,9 @@ extern int SendReceiveBlockingLock(const unsigned int xid,
 			struct smb_hdr *out_buf,
 			int *bytes_returned);
 extern int checkSMB(struct smb_hdr *smb, __u16 mid, unsigned int length);
-extern int is_valid_oplock_break(struct smb_hdr *smb, struct TCP_Server_Info *);
-extern int is_size_safe_to_change(struct cifsInodeInfo *, __u64 eof);
+extern bool is_valid_oplock_break(struct smb_hdr *smb,
+				  struct TCP_Server_Info *);
+extern bool is_size_safe_to_change(struct cifsInodeInfo *, __u64 eof);
 extern struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *);
 #ifdef CONFIG_CIFS_EXPERIMENTAL
 extern struct cifsFileInfo *find_readable_file(struct cifsInodeInfo *);
@@ -189,11 +190,11 @@ extern int CIFSSMBSetAttrLegacy(int xid, struct cifsTconInfo *tcon,
 #endif /* possibly unneeded function */
 extern int CIFSSMBSetEOF(const int xid, struct cifsTconInfo *tcon,
 			const char *fileName, __u64 size,
-			int setAllocationSizeFlag,
+			bool setAllocationSizeFlag,
 			const struct nls_table *nls_codepage, int cifs_flags);
 extern int CIFSSMBSetFileSize(const int xid, struct cifsTconInfo *tcon,
 			 __u64 size, __u16 fileHandle, __u32 opener_pid,
-			int AllocSizeFlag);
+			bool AllocSizeFlag);
 extern int CIFSSMBUnixSetPerms(const int xid, struct cifsTconInfo *pTcon,
 			char *full_path, __u64 mode, __u64 uid,
 			__u64 gid, dev_t dev,
@@ -283,11 +284,11 @@ extern int CIFSSMBLock(const int xid, struct cifsTconInfo *tcon,
 			const __u16 netfid, const __u64 len,
 			const __u64 offset, const __u32 numUnlock,
 			const __u32 numLock, const __u8 lockType,
-			const int waitFlag);
+			const bool waitFlag);
 extern int CIFSSMBPosixLock(const int xid, struct cifsTconInfo *tcon,
 			const __u16 smb_file_id, const int get_flag,
 			const __u64 len, struct file_lock *,
-			const __u16 lock_type, const int waitFlag);
+			const __u16 lock_type, const bool waitFlag);
 extern int CIFSSMBTDis(const int xid, struct cifsTconInfo *tcon);
 extern int CIFSSMBLogoff(const int xid, struct cifsSesInfo *ses);
 
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 222387c..ee59e93 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -95,7 +95,7 @@ static void mark_open_files_invalid(struct cifsTconInfo *pTcon)
 	list_for_each_safe(tmp, tmp1, &pTcon->openFileList) {
 		open_file = list_entry(tmp, struct cifsFileInfo, tlist);
 		if (open_file)
-			open_file->invalidHandle = TRUE;
+			open_file->invalidHandle = true;
 	}
 	write_unlock(&GlobalSMBSeslock);
 	/* BB Add call to invalidate_inodes(sb) for all superblocks mounted
@@ -141,7 +141,7 @@ small_smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
 				if (tcon->ses->server->tcpStatus ==
 							CifsNeedReconnect) {
 					/* on "soft" mounts we wait once */
-					if ((tcon->retry == FALSE) ||
+					if (!tcon->retry ||
 					   (tcon->ses->status == CifsExiting)) {
 						cFYI(1, ("gave up waiting on "
 						      "reconnect in smb_init"));
@@ -287,7 +287,7 @@ smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
 				if (tcon->ses->server->tcpStatus ==
 						CifsNeedReconnect) {
 					/* on "soft" mounts we wait once */
-					if ((tcon->retry == FALSE) ||
+					if (!tcon->retry ||
 					   (tcon->ses->status == CifsExiting)) {
 						cFYI(1, ("gave up waiting on "
 						      "reconnect in smb_init"));
@@ -1686,7 +1686,7 @@ int
 CIFSSMBLock(const int xid, struct cifsTconInfo *tcon,
 	    const __u16 smb_file_id, const __u64 len,
 	    const __u64 offset, const __u32 numUnlock,
-	    const __u32 numLock, const __u8 lockType, const int waitFlag)
+	    const __u32 numLock, const __u8 lockType, const bool waitFlag)
 {
 	int rc = 0;
 	LOCK_REQ *pSMB = NULL;
@@ -1695,7 +1695,7 @@ CIFSSMBLock(const int xid, struct cifsTconInfo *tcon,
 	int timeout = 0;
 	__u16 count;
 
-	cFYI(1, ("CIFSSMBLock timeout %d numLock %d", waitFlag, numLock));
+	cFYI(1, ("CIFSSMBLock timeout %d numLock %d", (int)waitFlag, numLock));
 	rc = small_smb_init(SMB_COM_LOCKING_ANDX, 8, tcon, (void **) &pSMB);
 
 	if (rc)
@@ -1706,7 +1706,7 @@ CIFSSMBLock(const int xid, struct cifsTconInfo *tcon,
 	if (lockType == LOCKING_ANDX_OPLOCK_RELEASE) {
 		timeout = CIFS_ASYNC_OP; /* no response expected */
 		pSMB->Timeout = 0;
-	} else if (waitFlag == TRUE) {
+	} else if (waitFlag) {
 		timeout = CIFS_BLOCKING_OP; /* blocking operation, no timeout */
 		pSMB->Timeout = cpu_to_le32(-1);/* blocking - do not time out */
 	} else {
@@ -1756,7 +1756,7 @@ int
 CIFSSMBPosixLock(const int xid, struct cifsTconInfo *tcon,
 		const __u16 smb_file_id, const int get_flag, const __u64 len,
 		struct file_lock *pLockData, const __u16 lock_type,
-		const int waitFlag)
+		const bool waitFlag)
 {
 	struct smb_com_transaction2_sfi_req *pSMB  = NULL;
 	struct smb_com_transaction2_sfi_rsp *pSMBr = NULL;
@@ -3584,9 +3584,9 @@ findFirstRetry:
 		rc = validate_t2((struct smb_t2_rsp *)pSMBr);
 		if (rc == 0) {
 			if (pSMBr->hdr.Flags2 & SMBFLG2_UNICODE)
-				psrch_inf->unicode = TRUE;
+				psrch_inf->unicode = true;
 			else
-				psrch_inf->unicode = FALSE;
+				psrch_inf->unicode = false;
 
 			psrch_inf->ntwrk_buf_start = (char *)pSMBr;
 			psrch_inf->smallBuf = 0;
@@ -3597,9 +3597,9 @@ findFirstRetry:
 			       le16_to_cpu(pSMBr->t2.ParameterOffset));
 
 			if (parms->EndofSearch)
-				psrch_inf->endOfSearch = TRUE;
+				psrch_inf->endOfSearch = true;
 			else
-				psrch_inf->endOfSearch = FALSE;
+				psrch_inf->endOfSearch = false;
 
 			psrch_inf->entries_in_buffer =
 					le16_to_cpu(parms->SearchCount);
@@ -3627,7 +3627,7 @@ int CIFSFindNext(const int xid, struct cifsTconInfo *tcon,
 
 	cFYI(1, ("In FindNext"));
 
-	if (psrch_inf->endOfSearch == TRUE)
+	if (psrch_inf->endOfSearch)
 		return -ENOENT;
 
 	rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB,
@@ -3685,7 +3685,7 @@ int CIFSFindNext(const int xid, struct cifsTconInfo *tcon,
 	cifs_stats_inc(&tcon->num_fnext);
 	if (rc) {
 		if (rc == -EBADF) {
-			psrch_inf->endOfSearch = TRUE;
+			psrch_inf->endOfSearch = true;
 			rc = 0; /* search probably was closed at end of search*/
 		} else
 			cFYI(1, ("FindNext returned = %d", rc));
@@ -3695,9 +3695,9 @@ int CIFSFindNext(const int xid, struct cifsTconInfo *tcon,
 		if (rc == 0) {
 			/* BB fixme add lock for file (srch_info) struct here */
 			if (pSMBr->hdr.Flags2 & SMBFLG2_UNICODE)
-				psrch_inf->unicode = TRUE;
+				psrch_inf->unicode = true;
 			else
-				psrch_inf->unicode = FALSE;
+				psrch_inf->unicode = false;
 			response_data = (char *) &pSMBr->hdr.Protocol +
 			       le16_to_cpu(pSMBr->t2.ParameterOffset);
 			parms = (T2_FNEXT_RSP_PARMS *)response_data;
@@ -3712,9 +3712,9 @@ int CIFSFindNext(const int xid, struct cifsTconInfo *tcon,
 			psrch_inf->ntwrk_buf_start = (char *)pSMB;
 			psrch_inf->smallBuf = 0;
 			if (parms->EndofSearch)
-				psrch_inf->endOfSearch = TRUE;
+				psrch_inf->endOfSearch = true;
 			else
-				psrch_inf->endOfSearch = FALSE;
+				psrch_inf->endOfSearch = false;
 			psrch_inf->entries_in_buffer =
 						le16_to_cpu(parms->SearchCount);
 			psrch_inf->index_of_last_entry +=
@@ -4590,7 +4590,7 @@ QFSPosixRetry:
 
 int
 CIFSSMBSetEOF(const int xid, struct cifsTconInfo *tcon, const char *fileName,
-	      __u64 size, int SetAllocation,
+	      __u64 size, bool SetAllocation,
 	      const struct nls_table *nls_codepage, int cifs_flags)
 {
 	struct smb_com_transaction2_spi_req *pSMB = NULL;
@@ -4679,7 +4679,7 @@ SetEOFRetry:
 
 int
 CIFSSMBSetFileSize(const int xid, struct cifsTconInfo *tcon, __u64 size,
-		   __u16 fid, __u32 pid_of_opener, int SetAllocation)
+		   __u16 fid, __u32 pid_of_opener, bool SetAllocation)
 {
 	struct smb_com_transaction2_sfi_req *pSMB  = NULL;
 	char *data_offset;
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index a951c63..7c0e1ac 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -71,23 +71,23 @@ struct smb_vol {
 	mode_t file_mode;
 	mode_t dir_mode;
 	unsigned secFlg;
-	unsigned rw:1;
-	unsigned retry:1;
-	unsigned intr:1;
-	unsigned setuids:1;
-	unsigned override_uid:1;
-	unsigned override_gid:1;
-	unsigned noperm:1;
-	unsigned no_psx_acl:1; /* set if posix acl support should be disabled */
-	unsigned cifs_acl:1;
-	unsigned no_xattr:1;   /* set if xattr (EA) support should be disabled*/
-	unsigned server_ino:1; /* use inode numbers from server ie UniqueId */
-	unsigned direct_io:1;
-	unsigned remap:1;   /* set to remap seven reserved chars in filenames */
-	unsigned posix_paths:1;   /* unset to not ask for posix pathnames. */
-	unsigned no_linux_ext:1;
-	unsigned sfu_emul:1;
-	unsigned nullauth:1; /* attempt to authenticate with null user */
+	bool rw:1;
+	bool retry:1;
+	bool intr:1;
+	bool setuids:1;
+	bool override_uid:1;
+	bool override_gid:1;
+	bool noperm:1;
+	bool no_psx_acl:1; /* set if posix acl support should be disabled */
+	bool cifs_acl:1;
+	bool no_xattr:1;   /* set if xattr (EA) support should be disabled*/
+	bool server_ino:1; /* use inode numbers from server ie UniqueId */
+	bool direct_io:1;
+	bool remap:1;     /* set to remap seven reserved chars in filenames */
+	bool posix_paths:1;   /* unset to not ask for posix pathnames. */
+	bool no_linux_ext:1;
+	bool sfu_emul:1;
+	bool nullauth:1; /* attempt to authenticate with null user */
 	unsigned nocase;     /* request case insensitive filenames */
 	unsigned nobrl;      /* disable sending byte range locks to srv */
 	unsigned int rsize;
@@ -345,8 +345,8 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server)
 	struct task_struct *task_to_wake = NULL;
 	struct mid_q_entry *mid_entry;
 	char temp;
-	int isLargeBuf = FALSE;
-	int isMultiRsp;
+	bool isLargeBuf = false;
+	bool isMultiRsp;
 	int reconnect;
 
 	current->flags |= PF_MEMALLOC;
@@ -390,8 +390,8 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server)
 		} else /* if existing small buf clear beginning */
 			memset(smallbuf, 0, sizeof(struct smb_hdr));
 
-		isLargeBuf = FALSE;
-		isMultiRsp = FALSE;
+		isLargeBuf = false;
+		isMultiRsp = false;
 		smb_buffer = smallbuf;
 		iov.iov_base = smb_buffer;
 		iov.iov_len = 4;
@@ -517,7 +517,7 @@ incomplete_rcv:
 		reconnect = 0;
 
 		if (pdu_length > MAX_CIFS_SMALL_BUFFER_SIZE - 4) {
-			isLargeBuf = TRUE;
+			isLargeBuf = true;
 			memcpy(bigbuf, smallbuf, 4);
 			smb_buffer = bigbuf;
 		}
@@ -582,16 +582,18 @@ incomplete_rcv:
 			    (mid_entry->command == smb_buffer->Command)) {
 				if (check2ndT2(smb_buffer,server->maxBuf) > 0) {
 					/* We have a multipart transact2 resp */
-					isMultiRsp = TRUE;
+					isMultiRsp = true;
 					if (mid_entry->resp_buf) {
 						/* merge response - fix up 1st*/
 						if (coalesce_t2(smb_buffer,
 							mid_entry->resp_buf)) {
-							mid_entry->multiRsp = 1;
+							mid_entry->multiRsp =
+								 true;
 							break;
 						} else {
 							/* all parts received */
-							mid_entry->multiEnd = 1;
+							mid_entry->multiEnd =
+								 true;
 							goto multi_t2_fnd;
 						}
 					} else {
@@ -603,17 +605,15 @@ incomplete_rcv:
 							/* Have first buffer */
 							mid_entry->resp_buf =
 								 smb_buffer;
-							mid_entry->largeBuf = 1;
+							mid_entry->largeBuf = 
+								 true;
 							bigbuf = NULL;
 						}
 					}
 					break;
 				}
 				mid_entry->resp_buf = smb_buffer;
-				if (isLargeBuf)
-					mid_entry->largeBuf = 1;
-				else
-					mid_entry->largeBuf = 0;
+				mid_entry->largeBuf = isLargeBuf;
 multi_t2_fnd:
 				task_to_wake = mid_entry->tsk;
 				mid_entry->midState = MID_RESPONSE_RECEIVED;
@@ -638,8 +638,8 @@ multi_t2_fnd:
 					smallbuf = NULL;
 			}
 			wake_up_process(task_to_wake);
-		} else if ((is_valid_oplock_break(smb_buffer, server) == FALSE)
-		    && (isMultiRsp == FALSE)) {
+		} else if (!is_valid_oplock_break(smb_buffer, server) &&
+			   !isMultiRsp) {
 			cERROR(1, ("No task to wake, unknown frame received! "
 				   "NumMids %d", midCount.counter));
 			cifs_dump_mem("Received Data is: ", (char *)smb_buffer,
@@ -825,7 +825,7 @@ cifs_parse_mount_options(char *options, const char *devname,
 	vol->file_mode = (S_IRWXUGO | S_ISGID) & (~S_IXGRP);
 
 	/* vol->retry default is 0 (i.e. "soft" limited retry not hard retry) */
-	vol->rw = TRUE;
+	vol->rw = true;
 	/* default is always to request posix paths. */
 	vol->posix_paths = 1;
 
@@ -1181,7 +1181,7 @@ cifs_parse_mount_options(char *options, const char *devname,
 		} else if (strnicmp(data, "guest", 5) == 0) {
 			/* ignore */
 		} else if (strnicmp(data, "rw", 2) == 0) {
-			vol->rw = TRUE;
+			vol->rw = true;
 		} else if ((strnicmp(data, "suid", 4) == 0) ||
 				   (strnicmp(data, "nosuid", 6) == 0) ||
 				   (strnicmp(data, "exec", 4) == 0) ||
@@ -1197,7 +1197,7 @@ cifs_parse_mount_options(char *options, const char *devname,
 			    is ok to just ignore them */
 			continue;
 		} else if (strnicmp(data, "ro", 2) == 0) {
-			vol->rw = FALSE;
+			vol->rw = false;
 		} else if (strnicmp(data, "hard", 4) == 0) {
 			vol->retry = 1;
 		} else if (strnicmp(data, "soft", 4) == 0) {
@@ -2601,7 +2601,7 @@ sesssetup_nomem:	/* do not return an error on nomem for the info strings,
 
 static int
 CIFSNTLMSSPNegotiateSessSetup(unsigned int xid,
-			      struct cifsSesInfo *ses, int *pNTLMv2_flag,
+			      struct cifsSesInfo *ses, bool *pNTLMv2_flag,
 			      const struct nls_table *nls_codepage)
 {
 	struct smb_hdr *smb_buffer;
@@ -2624,7 +2624,7 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid,
 	if (ses == NULL)
 		return -EINVAL;
 	domain = ses->domainName;
-	*pNTLMv2_flag = FALSE;
+	*pNTLMv2_flag = false;
 	smb_buffer = cifs_buf_get();
 	if (smb_buffer == NULL) {
 		return -ENOMEM;
@@ -2777,7 +2777,7 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid,
 				       CIFS_CRYPTO_KEY_SIZE);
 				if (SecurityBlob2->NegotiateFlags &
 					cpu_to_le32(NTLMSSP_NEGOTIATE_NTLMV2))
-					*pNTLMv2_flag = TRUE;
+					*pNTLMv2_flag = true;
 
 				if ((SecurityBlob2->NegotiateFlags &
 					cpu_to_le32(NTLMSSP_NEGOTIATE_ALWAYS_SIGN))
@@ -2938,7 +2938,7 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid,
 }
 static int
 CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses,
-			char *ntlm_session_key, int ntlmv2_flag,
+			char *ntlm_session_key, bool ntlmv2_flag,
 			const struct nls_table *nls_codepage)
 {
 	struct smb_hdr *smb_buffer;
@@ -3567,7 +3567,7 @@ int cifs_setup_session(unsigned int xid, struct cifsSesInfo *pSesInfo,
 {
 	int rc = 0;
 	char ntlm_session_key[CIFS_SESS_KEY_SIZE];
-	int ntlmv2_flag = FALSE;
+	bool ntlmv2_flag = false;
 	int first_time = 0;
 
 	/* what if server changes its buffer size after dropping the session? */
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index 15fe3b4..6850199 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -130,7 +130,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
 	struct cifsFileInfo *pCifsFile = NULL;
 	struct cifsInodeInfo *pCifsInode;
 	int disposition = FILE_OVERWRITE_IF;
-	int write_only = FALSE;
+	bool write_only = false;
 
 	xid = GetXid();
 
@@ -152,7 +152,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
 		if (oflags & FMODE_WRITE) {
 			desiredAccess |= GENERIC_WRITE;
 			if (!(oflags & FMODE_READ))
-				write_only = TRUE;
+				write_only = true;
 		}
 
 		if ((oflags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
@@ -252,7 +252,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
 			d_instantiate(direntry, newinode);
 		}
 		if ((nd == NULL /* nfsd case - nfs srv does not set nd */) ||
-			((nd->flags & LOOKUP_OPEN) == FALSE)) {
+			(!(nd->flags & LOOKUP_OPEN))) {
 			/* mknod case - do not leave file open */
 			CIFSSMBClose(xid, pTcon, fileHandle);
 		} else if (newinode) {
@@ -264,8 +264,8 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
 			pCifsFile->netfid = fileHandle;
 			pCifsFile->pid = current->tgid;
 			pCifsFile->pInode = newinode;
-			pCifsFile->invalidHandle = FALSE;
-			pCifsFile->closePend     = FALSE;
+			pCifsFile->invalidHandle = false;
+			pCifsFile->closePend     = false;
 			init_MUTEX(&pCifsFile->fh_sem);
 			mutex_init(&pCifsFile->lock_mutex);
 			INIT_LIST_HEAD(&pCifsFile->llist);
@@ -278,7 +278,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
 			pCifsInode = CIFS_I(newinode);
 			if (pCifsInode) {
 				/* if readable file instance put first in list*/
-				if (write_only == TRUE) {
+				if (write_only) {
 					list_add_tail(&pCifsFile->flist,
 						&pCifsInode->openFileList);
 				} else {
@@ -286,12 +286,12 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
 						&pCifsInode->openFileList);
 				}
 				if ((oplock & 0xF) == OPLOCK_EXCLUSIVE) {
-					pCifsInode->clientCanCacheAll = TRUE;
-					pCifsInode->clientCanCacheRead = TRUE;
+					pCifsInode->clientCanCacheAll = true;
+					pCifsInode->clientCanCacheRead = true;
 					cFYI(1, ("Exclusive Oplock inode %p",
 						newinode));
 				} else if ((oplock & 0xF) == OPLOCK_READ)
-					pCifsInode->clientCanCacheRead = TRUE;
+					pCifsInode->clientCanCacheRead = true;
 			}
 			write_unlock(&GlobalSMBSeslock);
 		}
diff --git a/fs/cifs/fcntl.c b/fs/cifs/fcntl.c
index d345b0b..a7cd331 100644
--- a/fs/cifs/fcntl.c
+++ b/fs/cifs/fcntl.c
@@ -68,7 +68,7 @@ int cifs_dir_notify(struct file *file, unsigned long arg)
 {
 	int xid;
 	int rc = -EINVAL;
-	int oplock = FALSE;
+	int oplock = 0;
 	struct cifs_sb_info *cifs_sb;
 	struct cifsTconInfo *pTcon;
 	char *full_path = NULL;
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index b0e7795..2c3a099 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -51,8 +51,8 @@ static inline struct cifsFileInfo *cifs_init_private(
 	INIT_LIST_HEAD(&private_data->llist);
 	private_data->pfile = file; /* needed for writepage */
 	private_data->pInode = inode;
-	private_data->invalidHandle = FALSE;
-	private_data->closePend = FALSE;
+	private_data->invalidHandle = false;
+	private_data->closePend = false;
 	/* we have to track num writers to the inode, since writepages
 	does not tell us which handle the write is for so there can
 	be a close (overlapping with write) of the filehandle that
@@ -148,12 +148,12 @@ client_can_cache:
 			full_path, buf, inode->i_sb, xid);
 
 	if ((*oplock & 0xF) == OPLOCK_EXCLUSIVE) {
-		pCifsInode->clientCanCacheAll = TRUE;
-		pCifsInode->clientCanCacheRead = TRUE;
+		pCifsInode->clientCanCacheAll = true;
+		pCifsInode->clientCanCacheRead = true;
 		cFYI(1, ("Exclusive Oplock granted on inode %p",
 			 file->f_path.dentry->d_inode));
 	} else if ((*oplock & 0xF) == OPLOCK_READ)
-		pCifsInode->clientCanCacheRead = TRUE;
+		pCifsInode->clientCanCacheRead = true;
 
 	return rc;
 }
@@ -247,7 +247,7 @@ int cifs_open(struct inode *inode, struct file *file)
 	if (oplockEnabled)
 		oplock = REQ_OPLOCK;
 	else
-		oplock = FALSE;
+		oplock = 0;
 
 	/* BB pass O_SYNC flag through on file attributes .. BB */
 
@@ -338,7 +338,7 @@ static int cifs_relock_file(struct cifsFileInfo *cifsFile)
 	return rc;
 }
 
-static int cifs_reopen_file(struct file *file, int can_flush)
+static int cifs_reopen_file(struct file *file, bool can_flush)
 {
 	int rc = -EACCES;
 	int xid, oplock;
@@ -359,7 +359,7 @@ static int cifs_reopen_file(struct file *file, int can_flush)
 
 	xid = GetXid();
 	down(&pCifsFile->fh_sem);
-	if (pCifsFile->invalidHandle == FALSE) {
+	if (!pCifsFile->invalidHandle) {
 		up(&pCifsFile->fh_sem);
 		FreeXid(xid);
 		return 0;
@@ -403,7 +403,7 @@ reopen_error_exit:
 	if (oplockEnabled)
 		oplock = REQ_OPLOCK;
 	else
-		oplock = FALSE;
+		oplock = 0;
 
 	/* Can not refresh inode by passing in file_info buf to be returned
 	   by SMBOpen and then calling get_inode_info with returned buf
@@ -420,7 +420,7 @@ reopen_error_exit:
 		cFYI(1, ("oplock: %d", oplock));
 	} else {
 		pCifsFile->netfid = netfid;
-		pCifsFile->invalidHandle = FALSE;
+		pCifsFile->invalidHandle = false;
 		up(&pCifsFile->fh_sem);
 		pCifsInode = CIFS_I(inode);
 		if (pCifsInode) {
@@ -430,8 +430,8 @@ reopen_error_exit:
 					CIFS_I(inode)->write_behind_rc = rc;
 			/* temporarily disable caching while we
 			   go to server to get inode info */
-				pCifsInode->clientCanCacheAll = FALSE;
-				pCifsInode->clientCanCacheRead = FALSE;
+				pCifsInode->clientCanCacheAll = false;
+				pCifsInode->clientCanCacheRead = false;
 				if (pTcon->unix_ext)
 					rc = cifs_get_inode_info_unix(&inode,
 						full_path, inode->i_sb, xid);
@@ -446,16 +446,16 @@ reopen_error_exit:
 			     we can not go to the server to get the new inod
 			     info */
 			if ((oplock & 0xF) == OPLOCK_EXCLUSIVE) {
-				pCifsInode->clientCanCacheAll = TRUE;
-				pCifsInode->clientCanCacheRead = TRUE;
+				pCifsInode->clientCanCacheAll = true;
+				pCifsInode->clientCanCacheRead = true;
 				cFYI(1, ("Exclusive Oplock granted on inode %p",
 					 file->f_path.dentry->d_inode));
 			} else if ((oplock & 0xF) == OPLOCK_READ) {
-				pCifsInode->clientCanCacheRead = TRUE;
-				pCifsInode->clientCanCacheAll = FALSE;
+				pCifsInode->clientCanCacheRead = true;
+				pCifsInode->clientCanCacheAll = false;
 			} else {
-				pCifsInode->clientCanCacheRead = FALSE;
-				pCifsInode->clientCanCacheAll = FALSE;
+				pCifsInode->clientCanCacheRead = false;
+				pCifsInode->clientCanCacheAll = false;
 			}
 			cifs_relock_file(pCifsFile);
 		}
@@ -482,7 +482,7 @@ int cifs_close(struct inode *inode, struct file *file)
 	if (pSMBFile) {
 		struct cifsLockInfo *li, *tmp;
 
-		pSMBFile->closePend = TRUE;
+		pSMBFile->closePend = true;
 		if (pTcon) {
 			/* no sense reconnecting to close a file that is
 			   already closed */
@@ -551,8 +551,8 @@ int cifs_close(struct inode *inode, struct file *file)
 		cFYI(1, ("closing last open instance for inode %p", inode));
 		/* if the file is not open we do not know if we can cache info
 		   on this inode, much less write behind and read ahead */
-		CIFS_I(inode)->clientCanCacheRead = FALSE;
-		CIFS_I(inode)->clientCanCacheAll  = FALSE;
+		CIFS_I(inode)->clientCanCacheRead = false;
+		CIFS_I(inode)->clientCanCacheAll  = false;
 	}
 	read_unlock(&GlobalSMBSeslock);
 	if ((rc == 0) && CIFS_I(inode)->write_behind_rc)
@@ -581,9 +581,9 @@ int cifs_closedir(struct inode *inode, struct file *file)
 		pTcon = cifs_sb->tcon;
 
 		cFYI(1, ("Freeing private data in close dir"));
-		if ((pCFileStruct->srch_inf.endOfSearch == FALSE) &&
-		   (pCFileStruct->invalidHandle == FALSE)) {
-			pCFileStruct->invalidHandle = TRUE;
+		if (!pCFileStruct->srch_inf.endOfSearch &&
+		    !pCFileStruct->invalidHandle) {
+			pCFileStruct->invalidHandle = true;
 			rc = CIFSFindClose(xid, pTcon, pCFileStruct->netfid);
 			cFYI(1, ("Closing uncompleted readdir with rc %d",
 				 rc));
@@ -635,12 +635,12 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock)
 	__u32 numLock = 0;
 	__u32 numUnlock = 0;
 	__u64 length;
-	int wait_flag = FALSE;
+	bool wait_flag = false;
 	struct cifs_sb_info *cifs_sb;
 	struct cifsTconInfo *pTcon;
 	__u16 netfid;
 	__u8 lockType = LOCKING_ANDX_LARGE_FILES;
-	int posix_locking;
+	bool posix_locking;
 
 	length = 1 + pfLock->fl_end - pfLock->fl_start;
 	rc = -EACCES;
@@ -657,7 +657,7 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock)
 		cFYI(1, ("Flock"));
 	if (pfLock->fl_flags & FL_SLEEP) {
 		cFYI(1, ("Blocking lock"));
-		wait_flag = TRUE;
+		wait_flag = true;
 	}
 	if (pfLock->fl_flags & FL_ACCESS)
 		cFYI(1, ("Process suspended by mandatory locking - "
@@ -792,7 +792,7 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock)
 					stored_rc = CIFSSMBLock(xid, pTcon,
 							netfid,
 							li->length, li->offset,
-							1, 0, li->type, FALSE);
+							1, 0, li->type, false);
 					if (stored_rc)
 						rc = stored_rc;
 
@@ -864,7 +864,7 @@ ssize_t cifs_user_write(struct file *file, const char __user *write_data,
 				   filemap_fdatawait from here so tell
 				   reopen_file not to flush data to server
 				   now */
-				rc = cifs_reopen_file(file, FALSE);
+				rc = cifs_reopen_file(file, false);
 				if (rc != 0)
 					break;
 			}
@@ -964,7 +964,7 @@ static ssize_t cifs_write(struct file *file, const char *write_data,
 				   filemap_fdatawait from here so tell
 				   reopen_file not to flush data to
 				   server now */
-				rc = cifs_reopen_file(file, FALSE);
+				rc = cifs_reopen_file(file, false);
 				if (rc != 0)
 					break;
 			}
@@ -1091,7 +1091,7 @@ refind_writable:
 
 			read_unlock(&GlobalSMBSeslock);
 			/* Had to unlock since following call can block */
-			rc = cifs_reopen_file(open_file->pfile, FALSE);
+			rc = cifs_reopen_file(open_file->pfile, false);
 			if (!rc) {
 				if (!open_file->closePend)
 					return open_file;
@@ -1606,7 +1606,7 @@ ssize_t cifs_user_read(struct file *file, char __user *read_data,
 			int buf_type = CIFS_NO_BUFFER;
 			if ((open_file->invalidHandle) &&
 			    (!open_file->closePend)) {
-				rc = cifs_reopen_file(file, TRUE);
+				rc = cifs_reopen_file(file, true);
 				if (rc != 0)
 					break;
 			}
@@ -1691,7 +1691,7 @@ static ssize_t cifs_read(struct file *file, char *read_data, size_t read_size,
 		while (rc == -EAGAIN) {
 			if ((open_file->invalidHandle) &&
 			    (!open_file->closePend)) {
-				rc = cifs_reopen_file(file, TRUE);
+				rc = cifs_reopen_file(file, true);
 				if (rc != 0)
 					break;
 			}
@@ -1848,7 +1848,7 @@ static int cifs_readpages(struct file *file, struct address_space *mapping,
 		while (rc == -EAGAIN) {
 			if ((open_file->invalidHandle) &&
 			    (!open_file->closePend)) {
-				rc = cifs_reopen_file(file, TRUE);
+				rc = cifs_reopen_file(file, true);
 				if (rc != 0)
 					break;
 			}
@@ -2007,10 +2007,10 @@ static int is_inode_writable(struct cifsInodeInfo *cifs_inode)
    refreshing the inode only on increases in the file size
    but this is tricky to do without racing with writebehind
    page caching in the current Linux kernel design */
-int is_size_safe_to_change(struct cifsInodeInfo *cifsInode, __u64 end_of_file)
+bool is_size_safe_to_change(struct cifsInodeInfo *cifsInode, __u64 end_of_file)
 {
 	if (!cifsInode)
-		return 1;
+		return true;
 
 	if (is_inode_writable(cifsInode)) {
 		/* This inode is open for write at least once */
@@ -2020,15 +2020,15 @@ int is_size_safe_to_change(struct cifsInodeInfo *cifsInode, __u64 end_of_file)
 		if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DIRECT_IO) {
 			/* since no page cache to corrupt on directio
 			we can change size safely */
-			return 1;
+			return true;
 		}
 
 		if (i_size_read(&cifsInode->vfs_inode) < end_of_file)
-			return 1;
+			return true;
 
-		return 0;
+		return false;
 	} else
-		return 1;
+		return true;
 }
 
 static int cifs_prepare_write(struct file *file, struct page *page,
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 13c728f..d247558 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -245,7 +245,7 @@ static int decode_sfu_inode(struct inode *inode, __u64 size,
 			    struct cifs_sb_info *cifs_sb, int xid)
 {
 	int rc;
-	int oplock = FALSE;
+	int oplock = 0;
 	__u16 netfid;
 	struct cifsTconInfo *pTcon = cifs_sb->tcon;
 	char buf[24];
@@ -353,7 +353,7 @@ int cifs_get_inode_info(struct inode **pinode,
 	struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
 	char *tmp_path;
 	char *buf = NULL;
-	int adjustTZ = FALSE;
+	bool adjustTZ = false;
 
 	pTcon = cifs_sb->tcon;
 	cFYI(1, ("Getting info on %s", search_path));
@@ -383,7 +383,7 @@ int cifs_get_inode_info(struct inode **pinode,
 			rc = SMBQueryInformation(xid, pTcon, search_path,
 						 pfindData, cifs_sb->local_nls,
 						 cifs_sb->mnt_cifs_flags);
-			adjustTZ = TRUE;
+			adjustTZ = true;
 		}
 	}
 	/* dump_mem("\nQPathInfo return data",&findData, sizeof(findData)); */
@@ -672,7 +672,7 @@ psx_del_no_retry:
 	} else if (rc == -ENOENT) {
 		d_drop(direntry);
 	} else if (rc == -ETXTBSY) {
-		int oplock = FALSE;
+		int oplock = 0;
 		__u16 netfid;
 
 		rc = CIFSSMBOpen(xid, pTcon, full_path, FILE_OPEN, DELETE,
@@ -702,7 +702,7 @@ psx_del_no_retry:
 				rc = -EOPNOTSUPP;
 
 			if (rc == -EOPNOTSUPP) {
-				int oplock = FALSE;
+				int oplock = 0;
 				__u16 netfid;
 			/*	rc = CIFSSMBSetAttrLegacy(xid, pTcon,
 							  full_path,
@@ -738,7 +738,7 @@ psx_del_no_retry:
 				if (direntry->d_inode)
 					drop_nlink(direntry->d_inode);
 			} else if (rc == -ETXTBSY) {
-				int oplock = FALSE;
+				int oplock = 0;
 				__u16 netfid;
 
 				rc = CIFSSMBOpen(xid, pTcon, full_path,
@@ -1103,7 +1103,7 @@ int cifs_rename(struct inode *source_inode, struct dentry *source_direntry,
 		cFYI(1, ("rename rc %d", rc));
 
 	if ((rc == -EIO) || (rc == -EEXIST)) {
-		int oplock = FALSE;
+		int oplock = 0;
 		__u16 netfid;
 
 		/* BB FIXME Is Generic Read correct for rename? */
@@ -1138,7 +1138,7 @@ int cifs_revalidate(struct dentry *direntry)
 	struct cifsInodeInfo *cifsInode;
 	loff_t local_size;
 	struct timespec local_mtime;
-	int invalidate_inode = FALSE;
+	bool invalidate_inode = false;
 
 	if (direntry->d_inode == NULL)
 		return -ENOENT;
@@ -1220,7 +1220,7 @@ int cifs_revalidate(struct dentry *direntry)
 			   only ones who could have modified the file and the
 			   server copy is staler than ours */
 		} else {
-			invalidate_inode = TRUE;
+			invalidate_inode = true;
 		}
 	}
 
@@ -1354,8 +1354,8 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
 	int rc = -EACCES;
 	struct cifsFileInfo *open_file = NULL;
 	FILE_BASIC_INFO time_buf;
-	int set_time = FALSE;
-	int set_dosattr = FALSE;
+	bool set_time = false;
+	bool set_dosattr = false;
 	__u64 mode = 0xFFFFFFFFFFFFFFFFULL;
 	__u64 uid = 0xFFFFFFFFFFFFFFFFULL;
 	__u64 gid = 0xFFFFFFFFFFFFFFFFULL;
@@ -1415,7 +1415,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
 			__u16 nfid = open_file->netfid;
 			__u32 npid = open_file->pid;
 			rc = CIFSSMBSetFileSize(xid, pTcon, attrs->ia_size,
-						nfid, npid, FALSE);
+						nfid, npid, false);
 			atomic_dec(&open_file->wrtPending);
 			cFYI(1, ("SetFSize for attrs rc = %d", rc));
 			if ((rc == -EINVAL) || (rc == -EOPNOTSUPP)) {
@@ -1435,13 +1435,13 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
 			   it was found or because there was an error setting
 			   it by handle */
 			rc = CIFSSMBSetEOF(xid, pTcon, full_path,
-					   attrs->ia_size, FALSE,
+					   attrs->ia_size, false,
 					   cifs_sb->local_nls,
 					   cifs_sb->mnt_cifs_flags);
 			cFYI(1, ("SetEOF by path (setattrs) rc = %d", rc));
 			if ((rc == -EINVAL) || (rc == -EOPNOTSUPP)) {
 				__u16 netfid;
-				int oplock = FALSE;
+				int oplock = 0;
 
 				rc = SMBLegacyOpen(xid, pTcon, full_path,
 					FILE_OPEN,
@@ -1465,7 +1465,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
 
 		/* Server is ok setting allocation size implicitly - no need
 		   to call:
-		CIFSSMBSetEOF(xid, pTcon, full_path, attrs->ia_size, TRUE,
+		CIFSSMBSetEOF(xid, pTcon, full_path, attrs->ia_size, true,
 			 cifs_sb->local_nls);
 		   */
 
@@ -1512,7 +1512,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
 #endif
 			/* not writeable */
 			if ((cifsInode->cifsAttrs & ATTR_READONLY) == 0) {
-				set_dosattr = TRUE;
+				set_dosattr = true;
 				time_buf.Attributes =
 					cpu_to_le32(cifsInode->cifsAttrs |
 						    ATTR_READONLY);
@@ -1522,7 +1522,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
 			not be able to write to it - so if any write
 			bit is enabled for user or group or other we
 			need to at least try to remove r/o dos attr */
-			set_dosattr = TRUE;
+			set_dosattr = true;
 			time_buf.Attributes = cpu_to_le32(cifsInode->cifsAttrs &
 					    (~ATTR_READONLY));
 			/* Windows ignores set to zero */
@@ -1536,14 +1536,14 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
 	}
 
 	if (attrs->ia_valid & ATTR_ATIME) {
-		set_time = TRUE;
+		set_time = true;
 		time_buf.LastAccessTime =
 		    cpu_to_le64(cifs_UnixTimeToNT(attrs->ia_atime));
 	} else
 		time_buf.LastAccessTime = 0;
 
 	if (attrs->ia_valid & ATTR_MTIME) {
-		set_time = TRUE;
+		set_time = true;
 		time_buf.LastWriteTime =
 		    cpu_to_le64(cifs_UnixTimeToNT(attrs->ia_mtime));
 	} else
@@ -1554,7 +1554,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
 	   server times */
 
 	if (set_time && (attrs->ia_valid & ATTR_CTIME)) {
-		set_time = TRUE;
+		set_time = true;
 		/* Although Samba throws this field away
 		it may be useful to Windows - but we do
 		not want to set ctime unless some other
@@ -1577,7 +1577,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
 			rc = -EOPNOTSUPP;
 
 		if (rc == -EOPNOTSUPP) {
-			int oplock = FALSE;
+			int oplock = 0;
 			__u16 netfid;
 
 			cFYI(1, ("calling SetFileInfo since SetPathInfo for "
diff --git a/fs/cifs/link.c b/fs/cifs/link.c
index 4b5ca5f..98fa3bc 100644
--- a/fs/cifs/link.c
+++ b/fs/cifs/link.c
@@ -228,7 +228,7 @@ cifs_readlink(struct dentry *direntry, char __user *pBuffer, int buflen)
 	struct inode *inode = direntry->d_inode;
 	int rc = -EACCES;
 	int xid;
-	int oplock = FALSE;
+	int oplock = 0;
 	struct cifs_sb_info *cifs_sb;
 	struct cifsTconInfo *pTcon;
 	char *full_path = NULL;
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
index cd9d977..a0b02d1 100644
--- a/fs/cifs/misc.c
+++ b/fs/cifs/misc.c
@@ -496,7 +496,8 @@ checkSMB(struct smb_hdr *smb, __u16 mid, unsigned int length)
 	}
 	return 0;
 }
-int
+
+bool
 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;
@@ -522,17 +523,17 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv)
 				pnotify->Action));  /* BB removeme BB */
 			/*   cifs_dump_mem("Rcvd notify Data: ",buf,
 				sizeof(struct smb_hdr)+60); */
-			return TRUE;
+			return true;
 		}
 		if (pSMBr->hdr.Status.CifsError) {
 			cFYI(1, ("notify err 0x%d",
 				pSMBr->hdr.Status.CifsError));
-			return TRUE;
+			return true;
 		}
-		return FALSE;
+		return false;
 	}
 	if (pSMB->hdr.Command != SMB_COM_LOCKING_ANDX)
-		return FALSE;
+		return false;
 	if (pSMB->hdr.Flags & SMBFLG_RESPONSE) {
 		/* no sense logging error on invalid handle on oplock
 		   break - harmless race between close request and oplock
@@ -541,21 +542,21 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv)
 		if ((NT_STATUS_INVALID_HANDLE) ==
 		   le32_to_cpu(pSMB->hdr.Status.CifsError)) {
 			cFYI(1, ("invalid handle on oplock break"));
-			return TRUE;
+			return true;
 		} else if (ERRbadfid ==
 		   le16_to_cpu(pSMB->hdr.Status.DosError.Error)) {
-			return TRUE;
+			return true;
 		} else {
-			return FALSE; /* on valid oplock brk we get "request" */
+			return false; /* on valid oplock brk we get "request" */
 		}
 	}
 	if (pSMB->hdr.WordCount != 8)
-		return FALSE;
+		return false;
 
 	cFYI(1, ("oplock type 0x%d level 0x%d",
 		 pSMB->LockType, pSMB->OplockLevel));
 	if (!(pSMB->LockType & LOCKING_ANDX_OPLOCK_RELEASE))
-		return FALSE;
+		return false;
 
 	/* look up tcon based on tid & uid */
 	read_lock(&GlobalSMBSeslock);
@@ -573,11 +574,11 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv)
 					    ("file id match, oplock break"));
 					pCifsInode =
 						CIFS_I(netfile->pInode);
-					pCifsInode->clientCanCacheAll = FALSE;
+					pCifsInode->clientCanCacheAll = false;
 					if (pSMB->OplockLevel == 0)
 						pCifsInode->clientCanCacheRead
-							= FALSE;
-					pCifsInode->oplockPending = TRUE;
+							= false;
+					pCifsInode->oplockPending = true;
 					AllocOplockQEntry(netfile->pInode,
 							  netfile->netfid,
 							  tcon);
@@ -585,17 +586,17 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv)
 					    ("about to wake up oplock thread"));
 					if (oplockThread)
 					    wake_up_process(oplockThread);
-					return TRUE;
+					return true;
 				}
 			}
 			read_unlock(&GlobalSMBSeslock);
 			cFYI(1, ("No matching file for oplock break"));
-			return TRUE;
+			return true;
 		}
 	}
 	read_unlock(&GlobalSMBSeslock);
 	cFYI(1, ("Can not process oplock break for non-existent connection"));
-	return TRUE;
+	return true;
 }
 
 void
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
index 38811ce..06dda4b 100644
--- a/fs/cifs/readdir.c
+++ b/fs/cifs/readdir.c
@@ -447,8 +447,8 @@ static int initiate_cifs_search(const int xid, struct file *file)
 	if (file->private_data == NULL)
 		return -ENOMEM;
 	cifsFile = file->private_data;
-	cifsFile->invalidHandle = TRUE;
-	cifsFile->srch_inf.endOfSearch = FALSE;
+	cifsFile->invalidHandle = true;
+	cifsFile->srch_inf.endOfSearch = false;
 
 	cifs_sb = CIFS_SB(file->f_path.dentry->d_sb);
 	if (cifs_sb == NULL)
@@ -484,7 +484,7 @@ ffirst_retry:
 			   &cifsFile->netfid, &cifsFile->srch_inf,
 			   cifs_sb->mnt_cifs_flags, CIFS_DIR_SEP(cifs_sb));
 	if (rc == 0)
-		cifsFile->invalidHandle = FALSE;
+		cifsFile->invalidHandle = false;
 	if ((rc == -EOPNOTSUPP) &&
 		(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM)) {
 		cifs_sb->mnt_cifs_flags &= ~CIFS_MOUNT_SERVER_INUM;
@@ -669,7 +669,7 @@ static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon,
 	   (index_to_find < first_entry_in_buffer)) {
 		/* close and restart search */
 		cFYI(1, ("search backing up - close and restart search"));
-		cifsFile->invalidHandle = TRUE;
+		cifsFile->invalidHandle = true;
 		CIFSFindClose(xid, pTcon, cifsFile->netfid);
 		kfree(cifsFile->search_resume_name);
 		cifsFile->search_resume_name = NULL;
@@ -691,7 +691,7 @@ static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon,
 	}
 
 	while ((index_to_find >= cifsFile->srch_inf.index_of_last_entry) &&
-	      (rc == 0) && (cifsFile->srch_inf.endOfSearch == FALSE)) {
+	      (rc == 0) && !cifsFile->srch_inf.endOfSearch) {
 		cFYI(1, ("calling findnext2"));
 		rc = CIFSFindNext(xid, pTcon, cifsFile->netfid,
 				  &cifsFile->srch_inf);
@@ -1037,7 +1037,7 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir)
 				break;
 			}
 		} /* else {
-			cifsFile->invalidHandle = TRUE;
+			cifsFile->invalidHandle = true;
 			CIFSFindClose(xid, pTcon, cifsFile->netfid);
 		}
 		kfree(cifsFile->search_resume_name);
diff --git a/fs/cifs/smbencrypt.c b/fs/cifs/smbencrypt.c
index 58bbfd9..ff3232f 100644
--- a/fs/cifs/smbencrypt.c
+++ b/fs/cifs/smbencrypt.c
@@ -35,11 +35,11 @@
 #include "cifs_debug.h"
 #include "cifsencrypt.h"
 
-#ifndef FALSE
-#define FALSE 0
+#ifndef false
+#define false 0
 #endif
-#ifndef TRUE
-#define TRUE 1
+#ifndef true
+#define true 1
 #endif
 
 /* following came from the other byteorder.h to avoid include conflicts */
diff --git a/fs/cifs/xattr.c b/fs/cifs/xattr.c
index 5122683..b48680c 100644
--- a/fs/cifs/xattr.c
+++ b/fs/cifs/xattr.c
@@ -262,7 +262,7 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name,
 #ifdef CONFIG_CIFS_EXPERIMENTAL
 		else if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) {
 			__u16 fid;
-			int oplock = FALSE;
+			int oplock = 0;
 			struct cifs_ntsd *pacl = NULL;
 			__u32 buflen = 0;
 			if (experimEnabled)
-- 
1.5.4.rc2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/4] fs/cifs - Remove an indent level, use normal kthread_run arguments
  2008-03-20  1:11 ` [PATCH 2/4] fs/cifs - Use bool Joe Perches
@ 2008-03-20  1:11   ` Joe Perches
  2008-03-20  1:11     ` [PATCH 4/4] fs/cifs - Align case labels to switch Joe Perches
  2008-04-29  0:07   ` [PATCH 2/4] fs/cifs - Use bool Steve French
  1 sibling, 1 reply; 5+ messages in thread
From: Joe Perches @ 2008-03-20  1:11 UTC (permalink / raw)
  To: linux-kernel; +Cc: Steve French, linux-cifs-client, samba-technical


Signed-off-by: Joe Perches <joe@perches.com>
---
 fs/cifs/connect.c |   54 +++++++++++++++++++++++++---------------------------
 1 files changed, 26 insertions(+), 28 deletions(-)

diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 7c0e1ac..ca16fdc 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -330,8 +330,9 @@ static int coalesce_t2(struct smb_hdr *psecond, struct smb_hdr *pTargetSMB)
 }
 
 static int
-cifs_demultiplex_thread(struct TCP_Server_Info *server)
+cifs_demultiplex_thread(void *data);
 {
+	struct TCP_Server_Info *server = data;
 	int length;
 	unsigned int pdu_length, total_read;
 	struct smb_hdr *smb_buffer = NULL;
@@ -1367,35 +1368,31 @@ find_unc(__be32 new_target_ip_addr, char *uncName, char *userName)
 	list_for_each(tmp, &GlobalTreeConnectionList) {
 		cFYI(1, ("Next tcon"));
 		tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList);
-		if (tcon->ses) {
-			if (tcon->ses->server) {
-				cFYI(1,
-				     ("old ip addr: %x == new ip %x ?",
-				      tcon->ses->server->addr.sockAddr.sin_addr.
-				      s_addr, new_target_ip_addr));
-				if (tcon->ses->server->addr.sockAddr.sin_addr.
-				    s_addr == new_target_ip_addr) {
+		if (tcon->ses && tcon->ses->server) {
+			cFYI(1,
+			     ("old ip addr: %x == new ip %x ?",
+			      tcon->ses->server->addr.sockAddr.sin_addr.s_addr,
+			      new_target_ip_addr));
+			if (tcon->ses->server->addr.sockAddr.sin_addr.s_addr ==
+			    new_target_ip_addr) {
 	/* BB lock tcon, server and tcp session and increment use count here? */
-					/* found a match on the TCP session */
-					/* BB check if reconnection needed */
+				/* found a match on the TCP session */
+				/* BB check if reconnection needed */
+				cFYI(1,
+				     ("IP match, old UNC: %s new: %s",
+				      tcon->treeName, uncName));
+				if (strncmp(tcon->treeName, uncName,
+					    MAX_TREE_SIZE) == 0) {
 					cFYI(1,
-					      ("IP match, old UNC: %s new: %s",
+					     ("and old usr: %s new: %s",
 					      tcon->treeName, uncName));
-					if (strncmp
-					    (tcon->treeName, uncName,
-					     MAX_TREE_SIZE) == 0) {
-						cFYI(1,
-						     ("and old usr: %s new: %s",
-						      tcon->treeName, uncName));
-						if (strncmp
-						    (tcon->ses->userName,
-						     userName,
-						     MAX_USERNAME_SIZE) == 0) {
-							read_unlock(&GlobalSMBSeslock);
-							/* matched smb session
-							(user name */
-							return tcon;
-						}
+					if (strncmp(tcon->ses->userName,
+						    userName,
+						    MAX_USERNAME_SIZE) == 0) {
+						read_unlock(&GlobalSMBSeslock);
+						/* matched smb session
+						   (user name */
+						return tcon;
 					}
 				}
 			}
@@ -1973,7 +1970,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
 			so no need to spinlock this init of tcpStatus */
 			srvTcp->tcpStatus = CifsNew;
 			init_MUTEX(&srvTcp->tcpSem);
-			srvTcp->tsk = kthread_run((void *)(void *)cifs_demultiplex_thread, srvTcp, "cifsd");
+			srvTcp->tsk = kthread_run(cifs_demultiplex_thread,
+						  srvTcp, "cifsd");
 			if (IS_ERR(srvTcp->tsk)) {
 				rc = PTR_ERR(srvTcp->tsk);
 				cERROR(1, ("error %d create cifsd thread", rc));
-- 
1.5.4.rc2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 4/4] fs/cifs - Align case labels to switch
  2008-03-20  1:11   ` [PATCH 3/4] fs/cifs - Remove an indent level, use normal kthread_run arguments Joe Perches
@ 2008-03-20  1:11     ` Joe Perches
  0 siblings, 0 replies; 5+ messages in thread
From: Joe Perches @ 2008-03-20  1:11 UTC (permalink / raw)
  To: linux-kernel; +Cc: Steve French, linux-cifs-client, samba-technical


Signed-off-by: Joe Perches <joe@perches.com>
---
 fs/cifs/cifssmb.c |   72 +++++++++++++--------------
 fs/cifs/connect.c |    2 +-
 fs/cifs/ioctl.c   |   72 +++++++++++++-------------
 fs/cifs/misc.c    |  144 ++++++++++++++++++++++++++--------------------------
 4 files changed, 144 insertions(+), 146 deletions(-)

diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index ee59e93..b03403a 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -186,14 +186,13 @@ small_smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
 				   know whether we can continue or not without
 				   returning to caller to reset file handle */
 				switch (smb_command) {
-					case SMB_COM_READ_ANDX:
-					case SMB_COM_WRITE_ANDX:
-					case SMB_COM_CLOSE:
-					case SMB_COM_FIND_CLOSE2:
-					case SMB_COM_LOCKING_ANDX: {
-						unload_nls(nls_codepage);
-						return -EAGAIN;
-					}
+				case SMB_COM_READ_ANDX:
+				case SMB_COM_WRITE_ANDX:
+				case SMB_COM_CLOSE:
+				case SMB_COM_FIND_CLOSE2:
+				case SMB_COM_LOCKING_ANDX:
+					unload_nls(nls_codepage);
+					return -EAGAIN;
 				}
 			} else {
 				up(&tcon->ses->sesSem);
@@ -331,14 +330,13 @@ smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
 				   know whether we can continue or not without
 				   returning to caller to reset file handle */
 				switch (smb_command) {
-					case SMB_COM_READ_ANDX:
-					case SMB_COM_WRITE_ANDX:
-					case SMB_COM_CLOSE:
-					case SMB_COM_FIND_CLOSE2:
-					case SMB_COM_LOCKING_ANDX: {
-						unload_nls(nls_codepage);
-						return -EAGAIN;
-					}
+				case SMB_COM_READ_ANDX:
+				case SMB_COM_WRITE_ANDX:
+				case SMB_COM_CLOSE:
+				case SMB_COM_FIND_CLOSE2:
+				case SMB_COM_LOCKING_ANDX:
+					unload_nls(nls_codepage);
+					return -EAGAIN;
 				}
 			} else {
 				up(&tcon->ses->sesSem);
@@ -1139,27 +1137,27 @@ static __u16 convert_disposition(int disposition)
 	__u16 ofun = 0;
 
 	switch (disposition) {
-		case FILE_SUPERSEDE:
-			ofun = SMBOPEN_OCREATE | SMBOPEN_OTRUNC;
-			break;
-		case FILE_OPEN:
-			ofun = SMBOPEN_OAPPEND;
-			break;
-		case FILE_CREATE:
-			ofun = SMBOPEN_OCREATE;
-			break;
-		case FILE_OPEN_IF:
-			ofun = SMBOPEN_OCREATE | SMBOPEN_OAPPEND;
-			break;
-		case FILE_OVERWRITE:
-			ofun = SMBOPEN_OTRUNC;
-			break;
-		case FILE_OVERWRITE_IF:
-			ofun = SMBOPEN_OCREATE | SMBOPEN_OTRUNC;
-			break;
-		default:
-			cFYI(1, ("unknown disposition %d", disposition));
-			ofun =  SMBOPEN_OAPPEND; /* regular open */
+	case FILE_SUPERSEDE:
+		ofun = SMBOPEN_OCREATE | SMBOPEN_OTRUNC;
+		break;
+	case FILE_OPEN:
+		ofun = SMBOPEN_OAPPEND;
+		break;
+	case FILE_CREATE:
+		ofun = SMBOPEN_OCREATE;
+		break;
+	case FILE_OPEN_IF:
+		ofun = SMBOPEN_OCREATE | SMBOPEN_OAPPEND;
+		break;
+	case FILE_OVERWRITE:
+		ofun = SMBOPEN_OTRUNC;
+		break;
+	case FILE_OVERWRITE_IF:
+		ofun = SMBOPEN_OCREATE | SMBOPEN_OTRUNC;
+		break;
+	default:
+		cFYI(1, ("unknown disposition %d", disposition));
+		ofun =  SMBOPEN_OAPPEND; /* regular open */
 	}
 	return ofun;
 }
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index ca16fdc..5544fda 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -330,7 +330,7 @@ static int coalesce_t2(struct smb_hdr *psecond, struct smb_hdr *pTargetSMB)
 }
 
 static int
-cifs_demultiplex_thread(void *data);
+cifs_demultiplex_thread(void *data)
 {
 	struct TCP_Server_Info *server = data;
 	int length;
diff --git a/fs/cifs/ioctl.c b/fs/cifs/ioctl.c
index 5c792df..0083f3a 100644
--- a/fs/cifs/ioctl.c
+++ b/fs/cifs/ioctl.c
@@ -63,46 +63,46 @@ int cifs_ioctl(struct inode *inode, struct file *filep,
 #endif /* CONFIG_CIFS_POSIX */
 
 	switch (command) {
-		case CIFS_IOC_CHECKUMOUNT:
-			cFYI(1, ("User unmount attempted"));
-			if (cifs_sb->mnt_uid == current->uid)
-				rc = 0;
-			else {
-				rc = -EACCES;
-				cFYI(1, ("uids do not match"));
-			}
-			break;
+	case CIFS_IOC_CHECKUMOUNT:
+		cFYI(1, ("User unmount attempted"));
+		if (cifs_sb->mnt_uid == current->uid)
+			rc = 0;
+		else {
+			rc = -EACCES;
+			cFYI(1, ("uids do not match"));
+		}
+		break;
 #ifdef CONFIG_CIFS_POSIX
-		case FS_IOC_GETFLAGS:
-			if (CIFS_UNIX_EXTATTR_CAP & caps) {
-				if (pSMBFile == NULL)
-					break;
-				rc = CIFSGetExtAttr(xid, tcon, pSMBFile->netfid,
-					&ExtAttrBits, &ExtAttrMask);
-				if (rc == 0)
-					rc = put_user(ExtAttrBits &
-						FS_FL_USER_VISIBLE,
-						(int __user *)arg);
-			}
-			break;
+	case FS_IOC_GETFLAGS:
+		if (CIFS_UNIX_EXTATTR_CAP & caps) {
+			if (pSMBFile == NULL)
+				break;
+			rc = CIFSGetExtAttr(xid, tcon, pSMBFile->netfid,
+					    &ExtAttrBits, &ExtAttrMask);
+			if (rc == 0)
+				rc = put_user(ExtAttrBits &
+					      FS_FL_USER_VISIBLE,
+					      (int __user *)arg);
+		}
+		break;
 
-		case FS_IOC_SETFLAGS:
-			if (CIFS_UNIX_EXTATTR_CAP & caps) {
-				if (get_user(ExtAttrBits, (int __user *)arg)) {
-					rc = -EFAULT;
-					break;
-				}
-				if (pSMBFile == NULL)
-					break;
-				/* rc= CIFSGetExtAttr(xid,tcon,pSMBFile->netfid,
-					extAttrBits, &ExtAttrMask);*/
+	case FS_IOC_SETFLAGS:
+		if (CIFS_UNIX_EXTATTR_CAP & caps) {
+			if (get_user(ExtAttrBits, (int __user *)arg)) {
+				rc = -EFAULT;
+				break;
 			}
-			cFYI(1, ("set flags not implemented yet"));
-			break;
+			if (pSMBFile == NULL)
+				break;
+			/* rc= CIFSGetExtAttr(xid,tcon,pSMBFile->netfid,
+					      extAttrBits, &ExtAttrMask);*/
+		}
+		cFYI(1, ("set flags not implemented yet"));
+		break;
 #endif /* CONFIG_CIFS_POSIX */
-		default:
-			cFYI(1, ("unsupported ioctl"));
-			break;
+	default:
+		cFYI(1, ("unsupported ioctl"));
+		break;
 	}
 
 	FreeXid(xid);
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
index a0b02d1..4ddf11c 100644
--- a/fs/cifs/misc.c
+++ b/fs/cifs/misc.c
@@ -663,41 +663,41 @@ cifs_convertUCSpath(char *target, const __le16 *source, int maxlen,
 	for (i = 0, j = 0; i < maxlen; i++) {
 		src_char = le16_to_cpu(source[i]);
 		switch (src_char) {
-			case 0:
-				goto cUCS_out; /* BB check this BB */
-			case UNI_COLON:
-				target[j] = ':';
-				break;
-			case UNI_ASTERIK:
-				target[j] = '*';
-				break;
-			case UNI_QUESTION:
-				target[j] = '?';
-				break;
+		case 0:
+			goto cUCS_out; /* BB check this BB */
+		case UNI_COLON:
+			target[j] = ':';
+			break;
+		case UNI_ASTERIK:
+			target[j] = '*';
+			break;
+		case UNI_QUESTION:
+			target[j] = '?';
+			break;
 			/* BB We can not handle remapping slash until
 			   all the calls to build_path_from_dentry
 			   are modified, as they use slash as separator BB */
-			/* case UNI_SLASH:
-				target[j] = '\\';
-				break;*/
-			case UNI_PIPE:
-				target[j] = '|';
-				break;
-			case UNI_GRTRTHAN:
-				target[j] = '>';
-				break;
-			case UNI_LESSTHAN:
-				target[j] = '<';
-				break;
-			default:
-				len = cp->uni2char(src_char, &target[j],
-						NLS_MAX_CHARSET_SIZE);
-				if (len > 0) {
-					j += len;
-					continue;
-				} else {
-					target[j] = '?';
-				}
+		/* case UNI_SLASH:
+			target[j] = '\\';
+			break;*/
+		case UNI_PIPE:
+			target[j] = '|';
+			break;
+		case UNI_GRTRTHAN:
+			target[j] = '>';
+			break;
+		case UNI_LESSTHAN:
+			target[j] = '<';
+			break;
+		default:
+			len = cp->uni2char(src_char, &target[j],
+					   NLS_MAX_CHARSET_SIZE);
+			if (len > 0) {
+				j += len;
+				continue;
+			} else {
+				target[j] = '?';
+			}
 		}
 		j++;
 		/* make sure we do not overrun callers allocated temp buffer */
@@ -728,49 +728,49 @@ cifsConvertToUCS(__le16 *target, const char *source, int maxlen,
 	for (i = 0, j = 0; i < maxlen; j++) {
 		src_char = source[i];
 		switch (src_char) {
-			case 0:
-				target[j] = 0;
-				goto ctoUCS_out;
-			case ':':
-				target[j] = cpu_to_le16(UNI_COLON);
-				break;
-			case '*':
-				target[j] = cpu_to_le16(UNI_ASTERIK);
-				break;
-			case '?':
-				target[j] = cpu_to_le16(UNI_QUESTION);
-				break;
-			case '<':
-				target[j] = cpu_to_le16(UNI_LESSTHAN);
-				break;
-			case '>':
-				target[j] = cpu_to_le16(UNI_GRTRTHAN);
-				break;
-			case '|':
-				target[j] = cpu_to_le16(UNI_PIPE);
-				break;
+		case 0:
+			target[j] = 0;
+			goto ctoUCS_out;
+		case ':':
+			target[j] = cpu_to_le16(UNI_COLON);
+			break;
+		case '*':
+			target[j] = cpu_to_le16(UNI_ASTERIK);
+			break;
+		case '?':
+			target[j] = cpu_to_le16(UNI_QUESTION);
+			break;
+		case '<':
+			target[j] = cpu_to_le16(UNI_LESSTHAN);
+			break;
+		case '>':
+			target[j] = cpu_to_le16(UNI_GRTRTHAN);
+			break;
+		case '|':
+			target[j] = cpu_to_le16(UNI_PIPE);
+			break;
 			/* BB We can not handle remapping slash until
 			   all the calls to build_path_from_dentry
 			   are modified, as they use slash as separator BB */
-			/* case '\\':
-				target[j] = cpu_to_le16(UNI_SLASH);
-				break;*/
-			default:
-				charlen = cp->char2uni(source+i,
-					len_remaining, &temp);
-				/* if no match, use question mark, which
-				at least in some cases servers as wild card */
-				if (charlen < 1) {
-					target[j] = cpu_to_le16(0x003f);
-					charlen = 1;
-				} else
-					target[j] = cpu_to_le16(temp);
-				len_remaining -= charlen;
-				/* character may take more than one byte in the
-				   the source string, but will take exactly two
-				   bytes in the target string */
-				i += charlen;
-				continue;
+		/* case '\\':
+			target[j] = cpu_to_le16(UNI_SLASH);
+			break;*/
+		default:
+			charlen = cp->char2uni(source + i,
+					       len_remaining, &temp);
+			/* if no match, use question mark, which
+			   at least in some cases servers as wild card */
+			if (charlen < 1) {
+				target[j] = cpu_to_le16(0x003f);
+				charlen = 1;
+			} else
+				target[j] = cpu_to_le16(temp);
+			len_remaining -= charlen;
+			/* character may take more than one byte in the
+			   the source string, but will take exactly two
+			   bytes in the target string */
+			i += charlen;
+			continue;
 		}
 		i++; /* move to next char in source string */
 		len_remaining--;
-- 
1.5.4.rc2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/4] fs/cifs - Use bool
  2008-03-20  1:11 ` [PATCH 2/4] fs/cifs - Use bool Joe Perches
  2008-03-20  1:11   ` [PATCH 3/4] fs/cifs - Remove an indent level, use normal kthread_run arguments Joe Perches
@ 2008-04-29  0:07   ` Steve French
  1 sibling, 0 replies; 5+ messages in thread
From: Steve French @ 2008-04-29  0:07 UTC (permalink / raw)
  To: Joe Perches
  Cc: linux-kernel, Steve French, linux-cifs-client, samba-technical

merged - although it required various changes to get it to patch cleanly.

On Wed, Mar 19, 2008 at 8:11 PM, Joe Perches <joe@perches.com> wrote:
>
>  Signed-off-by: Joe Perches <joe@perches.com>
>  ---
>   fs/cifs/asn1.c       |   10 +++---
>   fs/cifs/cifsacl.c    |   16 +++++-----
>   fs/cifs/cifsfs.c     |    6 ++--
>   fs/cifs/cifsfs.h     |    8 -----
>   fs/cifs/cifsglob.h   |   44 +++++++++++----------------
>   fs/cifs/cifsproto.h  |   13 ++++----
>   fs/cifs/cifssmb.c    |   38 ++++++++++++------------
>   fs/cifs/connect.c    |   80 +++++++++++++++++++++++++-------------------------
>   fs/cifs/dir.c        |   18 +++++-----
>   fs/cifs/fcntl.c      |    2 +-
>   fs/cifs/file.c       |   80 +++++++++++++++++++++++++-------------------------
>   fs/cifs/inode.c      |   42 +++++++++++++-------------
>   fs/cifs/link.c       |    2 +-
>   fs/cifs/misc.c       |   33 ++++++++++----------
>   fs/cifs/readdir.c    |   12 ++++----
>   fs/cifs/smbencrypt.c |    8 ++--
>   fs/cifs/xattr.c      |    2 +-
>   17 files changed, 200 insertions(+), 214 deletions(-)
>
>  diff --git a/fs/cifs/asn1.c b/fs/cifs/asn1.c
>  index bcda2c6..cb52cbb 100644
>  --- a/fs/cifs/asn1.c
>  +++ b/fs/cifs/asn1.c
>  @@ -460,8 +460,8 @@ decode_negTokenInit(unsigned char *security_blob, int length,
>         unsigned char *sequence_end;
>         unsigned long *oid = NULL;
>         unsigned int cls, con, tag, oidlen, rc;
>  -       int use_ntlmssp = FALSE;
>  -       int use_kerberos = FALSE;
>  +       bool use_ntlmssp = false;
>  +       bool use_kerberos = false;
>
>         *secType = NTLM; /* BB eventually make Kerberos or NLTMSSP the default*/
>
>  @@ -561,15 +561,15 @@ decode_negTokenInit(unsigned char *security_blob, int length,
>                                         if (compare_oid(oid, oidlen,
>                                                         MSKRB5_OID,
>                                                         MSKRB5_OID_LEN))
>  -                                               use_kerberos = TRUE;
>  +                                               use_kerberos = true;
>                                         else if (compare_oid(oid, oidlen,
>                                                              KRB5_OID,
>                                                              KRB5_OID_LEN))
>  -                                               use_kerberos = TRUE;
>  +                                               use_kerberos = true;
>                                         else if (compare_oid(oid, oidlen,
>                                                              NTLMSSP_OID,
>                                                              NTLMSSP_OID_LEN))
>  -                                               use_ntlmssp = TRUE;
>  +                                               use_ntlmssp = true;
>
>                                         kfree(oid);
>                                 }
>  diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c
>  index 4fb75af..feb8dbb 100644
>  --- a/fs/cifs/cifsacl.c
>  +++ b/fs/cifs/cifsacl.c
>  @@ -559,7 +559,7 @@ static struct cifs_ntsd *get_cifs_acl(u32 *pacllen, struct inode *inode,
>                                        const char *path)
>   {
>         struct cifsFileInfo *open_file;
>  -       int unlock_file = FALSE;
>  +       bool unlock_file = false;
>         int xid;
>         int rc = -EIO;
>         __u16 fid;
>  @@ -582,10 +582,10 @@ static struct cifs_ntsd *get_cifs_acl(u32 *pacllen, struct inode *inode,
>         cifs_sb = CIFS_SB(sb);
>
>         if (open_file) {
>  -               unlock_file = TRUE;
>  +               unlock_file = true;
>                 fid = open_file->netfid;
>         } else {
>  -               int oplock = FALSE;
>  +               int oplock = 0;
>                 /* open file */
>                 rc = CIFSSMBOpen(xid, cifs_sb->tcon, path, FILE_OPEN,
>                                  READ_CONTROL, 0, &fid, &oplock, NULL,
>  @@ -599,7 +599,7 @@ static struct cifs_ntsd *get_cifs_acl(u32 *pacllen, struct inode *inode,
>
>         rc = CIFSSMBGetCIFSACL(xid, cifs_sb->tcon, fid, &pntsd, pacllen);
>         cFYI(1, ("GetCIFSACL rc = %d ACL len %d", rc, *pacllen));
>  -       if (unlock_file == TRUE)
>  +       if (unlock_file)
>                 atomic_dec(&open_file->wrtPending);
>         else
>                 CIFSSMBClose(xid, cifs_sb->tcon, fid);
>  @@ -613,7 +613,7 @@ static int set_cifs_acl(struct cifs_ntsd *pnntsd, __u32 acllen,
>                                 struct inode *inode, const char *path)
>   {
>         struct cifsFileInfo *open_file;
>  -       int unlock_file = FALSE;
>  +       bool unlock_file = false;
>         int xid;
>         int rc = -EIO;
>         __u16 fid;
>  @@ -634,10 +634,10 @@ static int set_cifs_acl(struct cifs_ntsd *pnntsd, __u32 acllen,
>
>         open_file = find_readable_file(CIFS_I(inode));
>         if (open_file) {
>  -               unlock_file = TRUE;
>  +               unlock_file = true;
>                 fid = open_file->netfid;
>         } else {
>  -               int oplock = FALSE;
>  +               int oplock = 0;
>                 /* open file */
>                 rc = CIFSSMBOpen(xid, cifs_sb->tcon, path, FILE_OPEN,
>                                  WRITE_DAC, 0, &fid, &oplock, NULL,
>  @@ -651,7 +651,7 @@ static int set_cifs_acl(struct cifs_ntsd *pnntsd, __u32 acllen,
>
>         rc = CIFSSMBSetCIFSACL(xid, cifs_sb->tcon, fid, pnntsd, acllen);
>         cFYI(DBG2, ("SetCIFSACL rc = %d", rc));
>  -       if (unlock_file == TRUE)
>  +       if (unlock_file)
>                 atomic_dec(&open_file->wrtPending);
>         else
>                 CIFSSMBClose(xid, cifs_sb->tcon, fid);
>  diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
>  index a04b17e..14dceac 100644
>  --- a/fs/cifs/cifsfs.c
>  +++ b/fs/cifs/cifsfs.c
>  @@ -306,8 +306,8 @@ cifs_alloc_inode(struct super_block *sb)
>         /* Until the file is open and we have gotten oplock
>         info back from the server, can not assume caching of
>         file data or metadata */
>  -       cifs_inode->clientCanCacheRead = FALSE;
>  -       cifs_inode->clientCanCacheAll = FALSE;
>  +       cifs_inode->clientCanCacheRead = false;
>  +       cifs_inode->clientCanCacheAll = false;
>         cifs_inode->vfs_inode.i_blkbits = 14;  /* 2**14 = CIFS_MAX_MSGSIZE */
>
>         /* Can not set i_flags here - they get immediately overwritten
>  @@ -945,7 +945,7 @@ static int cifs_oplock_thread(void *dummyarg)
>                                     rc = CIFSSMBLock(0, pTcon, netfid,
>                                             0 /* len */ , 0 /* offset */, 0,
>                                             0, LOCKING_ANDX_OPLOCK_RELEASE,
>  -                                           0 /* wait flag */);
>  +                                           false /* wait flag */);
>                                         cFYI(1, ("Oplock release rc = %d", rc));
>                                 }
>                         } else
>  diff --git a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h
>  index 6897830..ab7246a 100644
>  --- a/fs/cifs/cifsfs.h
>  +++ b/fs/cifs/cifsfs.h
>  @@ -24,14 +24,6 @@
>
>   #define ROOT_I 2
>
>  -#ifndef FALSE
>  -#define FALSE 0
>  -#endif
>  -
>  -#ifndef TRUE
>  -#define TRUE 1
>  -#endif
>  -
>   extern struct file_system_type cifs_fs_type;
>   extern const struct address_space_operations cifs_addr_ops;
>   extern const struct address_space_operations cifs_addr_ops_smallbuf;
>  diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
>  index 69a2e19..b7d9f69 100644
>  --- a/fs/cifs/cifsglob.h
>  +++ b/fs/cifs/cifsglob.h
>  @@ -57,14 +57,6 @@
>
>   #include "cifspdu.h"
>
>  -#ifndef FALSE
>  -#define FALSE 0
>  -#endif
>  -
>  -#ifndef TRUE
>  -#define TRUE 1
>  -#endif
>  -
>   #ifndef XATTR_DOS_ATTRIB
>   #define XATTR_DOS_ATTRIB "user.DOSATTRIB"
>   #endif
>  @@ -147,7 +139,7 @@ struct TCP_Server_Info {
>         enum protocolEnum protocolType;
>         char versionMajor;
>         char versionMinor;
>  -       unsigned svlocal:1;     /* local server or remote */
>  +       bool svlocal:1;                 /* local server or remote */
>         atomic_t socketUseCount; /* number of open cifs sessions on socket */
>         atomic_t inFlight;  /* number of requests on the wire to server */
>   #ifdef CONFIG_CIFS_STATS2
>  @@ -286,10 +278,10 @@ struct cifsTconInfo {
>         FILE_SYSTEM_DEVICE_INFO fsDevInfo;
>         FILE_SYSTEM_ATTRIBUTE_INFO fsAttrInfo; /* ok if fs name truncated */
>         FILE_SYSTEM_UNIX_INFO fsUnixInfo;
>  -       unsigned ipc:1;         /* set if connection to IPC$ eg for RPC/PIPES */
>  -       unsigned retry:1;
>  -       unsigned nocase:1;
>  -       unsigned unix_ext:1; /* if off disable Linux extensions to CIFS protocol
>  +       bool ipc:1;             /* set if connection to IPC$ eg for RPC/PIPES */
>  +       bool retry:1;
>  +       bool nocase:1;
>  +       bool unix_ext:1;  /* if false disable Linux extensions to CIFS protocol
>                                 for this mount even if server would support */
>         /* BB add field for back pointer to sb struct(s)? */
>   };
>  @@ -317,10 +309,10 @@ struct cifs_search_info {
>         char *srch_entries_start;
>         char *presume_name;
>         unsigned int resume_name_len;
>  -       unsigned endOfSearch:1;
>  -       unsigned emptyDir:1;
>  -       unsigned unicode:1;
>  -       unsigned smallBuf:1; /* so we know which buf_release function to call */
>  +       bool endOfSearch:1;
>  +       bool emptyDir:1;
>  +       bool unicode:1;
>  +       bool smallBuf:1; /* so we know which buf_release function to call */
>   };
>
>   struct cifsFileInfo {
>  @@ -335,9 +327,9 @@ struct cifsFileInfo {
>         struct inode *pInode; /* needed for oplock break */
>         struct mutex lock_mutex;
>         struct list_head llist; /* list of byte range locks we have. */
>  -       unsigned closePend:1;   /* file is marked to close */
>  -       unsigned invalidHandle:1;  /* file closed via session abend */
>  -       unsigned messageMode:1;    /* for pipes: message vs byte mode */
>  +       bool closePend:1;       /* file is marked to close */
>  +       bool invalidHandle:1;   /* file closed via session abend */
>  +       bool messageMode:1;     /* for pipes: message vs byte mode */
>         atomic_t wrtPending;   /* handle in use - defer close */
>         struct semaphore fh_sem; /* prevents reopen race after dead ses*/
>         char *search_resume_name; /* BB removeme BB */
>  @@ -356,9 +348,9 @@ struct cifsInodeInfo {
>         __u32 cifsAttrs; /* e.g. DOS archive bit, sparse, compressed, system */
>         atomic_t inUse;  /* num concurrent users (local openers cifs) of file*/
>         unsigned long time;     /* jiffies of last update/check of inode */
>  -       unsigned clientCanCacheRead:1; /* read oplock */
>  -       unsigned clientCanCacheAll:1;  /* read and writebehind oplock */
>  -       unsigned oplockPending:1;
>  +       bool clientCanCacheRead:1;      /* read oplock */
>  +       bool clientCanCacheAll:1;       /* read and writebehind oplock */
>  +       bool oplockPending:1;
>         struct inode vfs_inode;
>   };
>
>  @@ -426,9 +418,9 @@ struct mid_q_entry {
>         struct smb_hdr *resp_buf;       /* response buffer */
>         int midState;   /* wish this were enum but can not pass to wait_event */
>         __u8 command;   /* smb command code */
>  -       unsigned largeBuf:1;    /* if valid response, is pointer to large buf */
>  -       unsigned multiRsp:1;   /* multiple trans2 responses for one request  */
>  -       unsigned multiEnd:1; /* both received */
>  +       bool largeBuf:1;        /* if valid response, is pointer to large buf */
>  +       bool multiRsp:1;        /* multiple trans2 responses for one request  */
>  +       bool multiEnd:1;        /* both received */
>   };
>
>   struct oplock_q_entry {
>  diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h
>  index eaec2fd..26d33d0 100644
>  --- a/fs/cifs/cifsproto.h
>  +++ b/fs/cifs/cifsproto.h
>  @@ -59,8 +59,9 @@ extern int SendReceiveBlockingLock(const unsigned int xid,
>                         struct smb_hdr *out_buf,
>                         int *bytes_returned);
>   extern int checkSMB(struct smb_hdr *smb, __u16 mid, unsigned int length);
>  -extern int is_valid_oplock_break(struct smb_hdr *smb, struct TCP_Server_Info *);
>  -extern int is_size_safe_to_change(struct cifsInodeInfo *, __u64 eof);
>  +extern bool is_valid_oplock_break(struct smb_hdr *smb,
>  +                                 struct TCP_Server_Info *);
>  +extern bool is_size_safe_to_change(struct cifsInodeInfo *, __u64 eof);
>   extern struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *);
>   #ifdef CONFIG_CIFS_EXPERIMENTAL
>   extern struct cifsFileInfo *find_readable_file(struct cifsInodeInfo *);
>  @@ -189,11 +190,11 @@ extern int CIFSSMBSetAttrLegacy(int xid, struct cifsTconInfo *tcon,
>   #endif /* possibly unneeded function */
>   extern int CIFSSMBSetEOF(const int xid, struct cifsTconInfo *tcon,
>                         const char *fileName, __u64 size,
>  -                       int setAllocationSizeFlag,
>  +                       bool setAllocationSizeFlag,
>                         const struct nls_table *nls_codepage, int cifs_flags);
>   extern int CIFSSMBSetFileSize(const int xid, struct cifsTconInfo *tcon,
>                          __u64 size, __u16 fileHandle, __u32 opener_pid,
>  -                       int AllocSizeFlag);
>  +                       bool AllocSizeFlag);
>   extern int CIFSSMBUnixSetPerms(const int xid, struct cifsTconInfo *pTcon,
>                         char *full_path, __u64 mode, __u64 uid,
>                         __u64 gid, dev_t dev,
>  @@ -283,11 +284,11 @@ extern int CIFSSMBLock(const int xid, struct cifsTconInfo *tcon,
>                         const __u16 netfid, const __u64 len,
>                         const __u64 offset, const __u32 numUnlock,
>                         const __u32 numLock, const __u8 lockType,
>  -                       const int waitFlag);
>  +                       const bool waitFlag);
>   extern int CIFSSMBPosixLock(const int xid, struct cifsTconInfo *tcon,
>                         const __u16 smb_file_id, const int get_flag,
>                         const __u64 len, struct file_lock *,
>  -                       const __u16 lock_type, const int waitFlag);
>  +                       const __u16 lock_type, const bool waitFlag);
>   extern int CIFSSMBTDis(const int xid, struct cifsTconInfo *tcon);
>   extern int CIFSSMBLogoff(const int xid, struct cifsSesInfo *ses);
>
>  diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
>  index 222387c..ee59e93 100644
>  --- a/fs/cifs/cifssmb.c
>  +++ b/fs/cifs/cifssmb.c
>  @@ -95,7 +95,7 @@ static void mark_open_files_invalid(struct cifsTconInfo *pTcon)
>         list_for_each_safe(tmp, tmp1, &pTcon->openFileList) {
>                 open_file = list_entry(tmp, struct cifsFileInfo, tlist);
>                 if (open_file)
>  -                       open_file->invalidHandle = TRUE;
>  +                       open_file->invalidHandle = true;
>         }
>         write_unlock(&GlobalSMBSeslock);
>         /* BB Add call to invalidate_inodes(sb) for all superblocks mounted
>  @@ -141,7 +141,7 @@ small_smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
>                                 if (tcon->ses->server->tcpStatus ==
>                                                         CifsNeedReconnect) {
>                                         /* on "soft" mounts we wait once */
>  -                                       if ((tcon->retry == FALSE) ||
>  +                                       if (!tcon->retry ||
>                                            (tcon->ses->status == CifsExiting)) {
>                                                 cFYI(1, ("gave up waiting on "
>                                                       "reconnect in smb_init"));
>  @@ -287,7 +287,7 @@ smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
>                                 if (tcon->ses->server->tcpStatus ==
>                                                 CifsNeedReconnect) {
>                                         /* on "soft" mounts we wait once */
>  -                                       if ((tcon->retry == FALSE) ||
>  +                                       if (!tcon->retry ||
>                                            (tcon->ses->status == CifsExiting)) {
>                                                 cFYI(1, ("gave up waiting on "
>                                                       "reconnect in smb_init"));
>  @@ -1686,7 +1686,7 @@ int
>   CIFSSMBLock(const int xid, struct cifsTconInfo *tcon,
>             const __u16 smb_file_id, const __u64 len,
>             const __u64 offset, const __u32 numUnlock,
>  -           const __u32 numLock, const __u8 lockType, const int waitFlag)
>  +           const __u32 numLock, const __u8 lockType, const bool waitFlag)
>   {
>         int rc = 0;
>         LOCK_REQ *pSMB = NULL;
>  @@ -1695,7 +1695,7 @@ CIFSSMBLock(const int xid, struct cifsTconInfo *tcon,
>         int timeout = 0;
>         __u16 count;
>
>  -       cFYI(1, ("CIFSSMBLock timeout %d numLock %d", waitFlag, numLock));
>  +       cFYI(1, ("CIFSSMBLock timeout %d numLock %d", (int)waitFlag, numLock));
>         rc = small_smb_init(SMB_COM_LOCKING_ANDX, 8, tcon, (void **) &pSMB);
>
>         if (rc)
>  @@ -1706,7 +1706,7 @@ CIFSSMBLock(const int xid, struct cifsTconInfo *tcon,
>         if (lockType == LOCKING_ANDX_OPLOCK_RELEASE) {
>                 timeout = CIFS_ASYNC_OP; /* no response expected */
>                 pSMB->Timeout = 0;
>  -       } else if (waitFlag == TRUE) {
>  +       } else if (waitFlag) {
>                 timeout = CIFS_BLOCKING_OP; /* blocking operation, no timeout */
>                 pSMB->Timeout = cpu_to_le32(-1);/* blocking - do not time out */
>         } else {
>  @@ -1756,7 +1756,7 @@ int
>   CIFSSMBPosixLock(const int xid, struct cifsTconInfo *tcon,
>                 const __u16 smb_file_id, const int get_flag, const __u64 len,
>                 struct file_lock *pLockData, const __u16 lock_type,
>  -               const int waitFlag)
>  +               const bool waitFlag)
>   {
>         struct smb_com_transaction2_sfi_req *pSMB  = NULL;
>         struct smb_com_transaction2_sfi_rsp *pSMBr = NULL;
>  @@ -3584,9 +3584,9 @@ findFirstRetry:
>                 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
>                 if (rc == 0) {
>                         if (pSMBr->hdr.Flags2 & SMBFLG2_UNICODE)
>  -                               psrch_inf->unicode = TRUE;
>  +                               psrch_inf->unicode = true;
>                         else
>  -                               psrch_inf->unicode = FALSE;
>  +                               psrch_inf->unicode = false;
>
>                         psrch_inf->ntwrk_buf_start = (char *)pSMBr;
>                         psrch_inf->smallBuf = 0;
>  @@ -3597,9 +3597,9 @@ findFirstRetry:
>                                le16_to_cpu(pSMBr->t2.ParameterOffset));
>
>                         if (parms->EndofSearch)
>  -                               psrch_inf->endOfSearch = TRUE;
>  +                               psrch_inf->endOfSearch = true;
>                         else
>  -                               psrch_inf->endOfSearch = FALSE;
>  +                               psrch_inf->endOfSearch = false;
>
>                         psrch_inf->entries_in_buffer =
>                                         le16_to_cpu(parms->SearchCount);
>  @@ -3627,7 +3627,7 @@ int CIFSFindNext(const int xid, struct cifsTconInfo *tcon,
>
>         cFYI(1, ("In FindNext"));
>
>  -       if (psrch_inf->endOfSearch == TRUE)
>  +       if (psrch_inf->endOfSearch)
>                 return -ENOENT;
>
>         rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB,
>  @@ -3685,7 +3685,7 @@ int CIFSFindNext(const int xid, struct cifsTconInfo *tcon,
>         cifs_stats_inc(&tcon->num_fnext);
>         if (rc) {
>                 if (rc == -EBADF) {
>  -                       psrch_inf->endOfSearch = TRUE;
>  +                       psrch_inf->endOfSearch = true;
>                         rc = 0; /* search probably was closed at end of search*/
>                 } else
>                         cFYI(1, ("FindNext returned = %d", rc));
>  @@ -3695,9 +3695,9 @@ int CIFSFindNext(const int xid, struct cifsTconInfo *tcon,
>                 if (rc == 0) {
>                         /* BB fixme add lock for file (srch_info) struct here */
>                         if (pSMBr->hdr.Flags2 & SMBFLG2_UNICODE)
>  -                               psrch_inf->unicode = TRUE;
>  +                               psrch_inf->unicode = true;
>                         else
>  -                               psrch_inf->unicode = FALSE;
>  +                               psrch_inf->unicode = false;
>                         response_data = (char *) &pSMBr->hdr.Protocol +
>                                le16_to_cpu(pSMBr->t2.ParameterOffset);
>                         parms = (T2_FNEXT_RSP_PARMS *)response_data;
>  @@ -3712,9 +3712,9 @@ int CIFSFindNext(const int xid, struct cifsTconInfo *tcon,
>                         psrch_inf->ntwrk_buf_start = (char *)pSMB;
>                         psrch_inf->smallBuf = 0;
>                         if (parms->EndofSearch)
>  -                               psrch_inf->endOfSearch = TRUE;
>  +                               psrch_inf->endOfSearch = true;
>                         else
>  -                               psrch_inf->endOfSearch = FALSE;
>  +                               psrch_inf->endOfSearch = false;
>                         psrch_inf->entries_in_buffer =
>                                                 le16_to_cpu(parms->SearchCount);
>                         psrch_inf->index_of_last_entry +=
>  @@ -4590,7 +4590,7 @@ QFSPosixRetry:
>
>   int
>   CIFSSMBSetEOF(const int xid, struct cifsTconInfo *tcon, const char *fileName,
>  -             __u64 size, int SetAllocation,
>  +             __u64 size, bool SetAllocation,
>               const struct nls_table *nls_codepage, int cifs_flags)
>   {
>         struct smb_com_transaction2_spi_req *pSMB = NULL;
>  @@ -4679,7 +4679,7 @@ SetEOFRetry:
>
>   int
>   CIFSSMBSetFileSize(const int xid, struct cifsTconInfo *tcon, __u64 size,
>  -                  __u16 fid, __u32 pid_of_opener, int SetAllocation)
>  +                  __u16 fid, __u32 pid_of_opener, bool SetAllocation)
>   {
>         struct smb_com_transaction2_sfi_req *pSMB  = NULL;
>         char *data_offset;
>  diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
>  index a951c63..7c0e1ac 100644
>  --- a/fs/cifs/connect.c
>  +++ b/fs/cifs/connect.c
>  @@ -71,23 +71,23 @@ struct smb_vol {
>         mode_t file_mode;
>         mode_t dir_mode;
>         unsigned secFlg;
>  -       unsigned rw:1;
>  -       unsigned retry:1;
>  -       unsigned intr:1;
>  -       unsigned setuids:1;
>  -       unsigned override_uid:1;
>  -       unsigned override_gid:1;
>  -       unsigned noperm:1;
>  -       unsigned no_psx_acl:1; /* set if posix acl support should be disabled */
>  -       unsigned cifs_acl:1;
>  -       unsigned no_xattr:1;   /* set if xattr (EA) support should be disabled*/
>  -       unsigned server_ino:1; /* use inode numbers from server ie UniqueId */
>  -       unsigned direct_io:1;
>  -       unsigned remap:1;   /* set to remap seven reserved chars in filenames */
>  -       unsigned posix_paths:1;   /* unset to not ask for posix pathnames. */
>  -       unsigned no_linux_ext:1;
>  -       unsigned sfu_emul:1;
>  -       unsigned nullauth:1; /* attempt to authenticate with null user */
>  +       bool rw:1;
>  +       bool retry:1;
>  +       bool intr:1;
>  +       bool setuids:1;
>  +       bool override_uid:1;
>  +       bool override_gid:1;
>  +       bool noperm:1;
>  +       bool no_psx_acl:1; /* set if posix acl support should be disabled */
>  +       bool cifs_acl:1;
>  +       bool no_xattr:1;   /* set if xattr (EA) support should be disabled*/
>  +       bool server_ino:1; /* use inode numbers from server ie UniqueId */
>  +       bool direct_io:1;
>  +       bool remap:1;     /* set to remap seven reserved chars in filenames */
>  +       bool posix_paths:1;   /* unset to not ask for posix pathnames. */
>  +       bool no_linux_ext:1;
>  +       bool sfu_emul:1;
>  +       bool nullauth:1; /* attempt to authenticate with null user */
>         unsigned nocase;     /* request case insensitive filenames */
>         unsigned nobrl;      /* disable sending byte range locks to srv */
>         unsigned int rsize;
>  @@ -345,8 +345,8 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server)
>         struct task_struct *task_to_wake = NULL;
>         struct mid_q_entry *mid_entry;
>         char temp;
>  -       int isLargeBuf = FALSE;
>  -       int isMultiRsp;
>  +       bool isLargeBuf = false;
>  +       bool isMultiRsp;
>         int reconnect;
>
>         current->flags |= PF_MEMALLOC;
>  @@ -390,8 +390,8 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server)
>                 } else /* if existing small buf clear beginning */
>                         memset(smallbuf, 0, sizeof(struct smb_hdr));
>
>  -               isLargeBuf = FALSE;
>  -               isMultiRsp = FALSE;
>  +               isLargeBuf = false;
>  +               isMultiRsp = false;
>                 smb_buffer = smallbuf;
>                 iov.iov_base = smb_buffer;
>                 iov.iov_len = 4;
>  @@ -517,7 +517,7 @@ incomplete_rcv:
>                 reconnect = 0;
>
>                 if (pdu_length > MAX_CIFS_SMALL_BUFFER_SIZE - 4) {
>  -                       isLargeBuf = TRUE;
>  +                       isLargeBuf = true;
>                         memcpy(bigbuf, smallbuf, 4);
>                         smb_buffer = bigbuf;
>                 }
>  @@ -582,16 +582,18 @@ incomplete_rcv:
>                             (mid_entry->command == smb_buffer->Command)) {
>                                 if (check2ndT2(smb_buffer,server->maxBuf) > 0) {
>                                         /* We have a multipart transact2 resp */
>  -                                       isMultiRsp = TRUE;
>  +                                       isMultiRsp = true;
>                                         if (mid_entry->resp_buf) {
>                                                 /* merge response - fix up 1st*/
>                                                 if (coalesce_t2(smb_buffer,
>                                                         mid_entry->resp_buf)) {
>  -                                                       mid_entry->multiRsp = 1;
>  +                                                       mid_entry->multiRsp =
>  +                                                                true;
>                                                         break;
>                                                 } else {
>                                                         /* all parts received */
>  -                                                       mid_entry->multiEnd = 1;
>  +                                                       mid_entry->multiEnd =
>  +                                                                true;
>                                                         goto multi_t2_fnd;
>                                                 }
>                                         } else {
>  @@ -603,17 +605,15 @@ incomplete_rcv:
>                                                         /* Have first buffer */
>                                                         mid_entry->resp_buf =
>                                                                  smb_buffer;
>  -                                                       mid_entry->largeBuf = 1;
>  +                                                       mid_entry->largeBuf =
>  +                                                                true;
>                                                         bigbuf = NULL;
>                                                 }
>                                         }
>                                         break;
>                                 }
>                                 mid_entry->resp_buf = smb_buffer;
>  -                               if (isLargeBuf)
>  -                                       mid_entry->largeBuf = 1;
>  -                               else
>  -                                       mid_entry->largeBuf = 0;
>  +                               mid_entry->largeBuf = isLargeBuf;
>   multi_t2_fnd:
>                                 task_to_wake = mid_entry->tsk;
>                                 mid_entry->midState = MID_RESPONSE_RECEIVED;
>  @@ -638,8 +638,8 @@ multi_t2_fnd:
>                                         smallbuf = NULL;
>                         }
>                         wake_up_process(task_to_wake);
>  -               } else if ((is_valid_oplock_break(smb_buffer, server) == FALSE)
>  -                   && (isMultiRsp == FALSE)) {
>  +               } else if (!is_valid_oplock_break(smb_buffer, server) &&
>  +                          !isMultiRsp) {
>                         cERROR(1, ("No task to wake, unknown frame received! "
>                                    "NumMids %d", midCount.counter));
>                         cifs_dump_mem("Received Data is: ", (char *)smb_buffer,
>  @@ -825,7 +825,7 @@ cifs_parse_mount_options(char *options, const char *devname,
>         vol->file_mode = (S_IRWXUGO | S_ISGID) & (~S_IXGRP);
>
>         /* vol->retry default is 0 (i.e. "soft" limited retry not hard retry) */
>  -       vol->rw = TRUE;
>  +       vol->rw = true;
>         /* default is always to request posix paths. */
>         vol->posix_paths = 1;
>
>  @@ -1181,7 +1181,7 @@ cifs_parse_mount_options(char *options, const char *devname,
>                 } else if (strnicmp(data, "guest", 5) == 0) {
>                         /* ignore */
>                 } else if (strnicmp(data, "rw", 2) == 0) {
>  -                       vol->rw = TRUE;
>  +                       vol->rw = true;
>                 } else if ((strnicmp(data, "suid", 4) == 0) ||
>                                    (strnicmp(data, "nosuid", 6) == 0) ||
>                                    (strnicmp(data, "exec", 4) == 0) ||
>  @@ -1197,7 +1197,7 @@ cifs_parse_mount_options(char *options, const char *devname,
>                             is ok to just ignore them */
>                         continue;
>                 } else if (strnicmp(data, "ro", 2) == 0) {
>  -                       vol->rw = FALSE;
>  +                       vol->rw = false;
>                 } else if (strnicmp(data, "hard", 4) == 0) {
>                         vol->retry = 1;
>                 } else if (strnicmp(data, "soft", 4) == 0) {
>  @@ -2601,7 +2601,7 @@ sesssetup_nomem:  /* do not return an error on nomem for the info strings,
>
>   static int
>   CIFSNTLMSSPNegotiateSessSetup(unsigned int xid,
>  -                             struct cifsSesInfo *ses, int *pNTLMv2_flag,
>  +                             struct cifsSesInfo *ses, bool *pNTLMv2_flag,
>                               const struct nls_table *nls_codepage)
>   {
>         struct smb_hdr *smb_buffer;
>  @@ -2624,7 +2624,7 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid,
>         if (ses == NULL)
>                 return -EINVAL;
>         domain = ses->domainName;
>  -       *pNTLMv2_flag = FALSE;
>  +       *pNTLMv2_flag = false;
>         smb_buffer = cifs_buf_get();
>         if (smb_buffer == NULL) {
>                 return -ENOMEM;
>  @@ -2777,7 +2777,7 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid,
>                                        CIFS_CRYPTO_KEY_SIZE);
>                                 if (SecurityBlob2->NegotiateFlags &
>                                         cpu_to_le32(NTLMSSP_NEGOTIATE_NTLMV2))
>  -                                       *pNTLMv2_flag = TRUE;
>  +                                       *pNTLMv2_flag = true;
>
>                                 if ((SecurityBlob2->NegotiateFlags &
>                                         cpu_to_le32(NTLMSSP_NEGOTIATE_ALWAYS_SIGN))
>  @@ -2938,7 +2938,7 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid,
>   }
>   static int
>   CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses,
>  -                       char *ntlm_session_key, int ntlmv2_flag,
>  +                       char *ntlm_session_key, bool ntlmv2_flag,
>                         const struct nls_table *nls_codepage)
>   {
>         struct smb_hdr *smb_buffer;
>  @@ -3567,7 +3567,7 @@ int cifs_setup_session(unsigned int xid, struct cifsSesInfo *pSesInfo,
>   {
>         int rc = 0;
>         char ntlm_session_key[CIFS_SESS_KEY_SIZE];
>  -       int ntlmv2_flag = FALSE;
>  +       bool ntlmv2_flag = false;
>         int first_time = 0;
>
>         /* what if server changes its buffer size after dropping the session? */
>  diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
>  index 15fe3b4..6850199 100644
>  --- a/fs/cifs/dir.c
>  +++ b/fs/cifs/dir.c
>  @@ -130,7 +130,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
>         struct cifsFileInfo *pCifsFile = NULL;
>         struct cifsInodeInfo *pCifsInode;
>         int disposition = FILE_OVERWRITE_IF;
>  -       int write_only = FALSE;
>  +       bool write_only = false;
>
>         xid = GetXid();
>
>  @@ -152,7 +152,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
>                 if (oflags & FMODE_WRITE) {
>                         desiredAccess |= GENERIC_WRITE;
>                         if (!(oflags & FMODE_READ))
>  -                               write_only = TRUE;
>  +                               write_only = true;
>                 }
>
>                 if ((oflags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
>  @@ -252,7 +252,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
>                         d_instantiate(direntry, newinode);
>                 }
>                 if ((nd == NULL /* nfsd case - nfs srv does not set nd */) ||
>  -                       ((nd->flags & LOOKUP_OPEN) == FALSE)) {
>  +                       (!(nd->flags & LOOKUP_OPEN))) {
>                         /* mknod case - do not leave file open */
>                         CIFSSMBClose(xid, pTcon, fileHandle);
>                 } else if (newinode) {
>  @@ -264,8 +264,8 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
>                         pCifsFile->netfid = fileHandle;
>                         pCifsFile->pid = current->tgid;
>                         pCifsFile->pInode = newinode;
>  -                       pCifsFile->invalidHandle = FALSE;
>  -                       pCifsFile->closePend     = FALSE;
>  +                       pCifsFile->invalidHandle = false;
>  +                       pCifsFile->closePend     = false;
>                         init_MUTEX(&pCifsFile->fh_sem);
>                         mutex_init(&pCifsFile->lock_mutex);
>                         INIT_LIST_HEAD(&pCifsFile->llist);
>  @@ -278,7 +278,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
>                         pCifsInode = CIFS_I(newinode);
>                         if (pCifsInode) {
>                                 /* if readable file instance put first in list*/
>  -                               if (write_only == TRUE) {
>  +                               if (write_only) {
>                                         list_add_tail(&pCifsFile->flist,
>                                                 &pCifsInode->openFileList);
>                                 } else {
>  @@ -286,12 +286,12 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
>                                                 &pCifsInode->openFileList);
>                                 }
>                                 if ((oplock & 0xF) == OPLOCK_EXCLUSIVE) {
>  -                                       pCifsInode->clientCanCacheAll = TRUE;
>  -                                       pCifsInode->clientCanCacheRead = TRUE;
>  +                                       pCifsInode->clientCanCacheAll = true;
>  +                                       pCifsInode->clientCanCacheRead = true;
>                                         cFYI(1, ("Exclusive Oplock inode %p",
>                                                 newinode));
>                                 } else if ((oplock & 0xF) == OPLOCK_READ)
>  -                                       pCifsInode->clientCanCacheRead = TRUE;
>  +                                       pCifsInode->clientCanCacheRead = true;
>                         }
>                         write_unlock(&GlobalSMBSeslock);
>                 }
>  diff --git a/fs/cifs/fcntl.c b/fs/cifs/fcntl.c
>  index d345b0b..a7cd331 100644
>  --- a/fs/cifs/fcntl.c
>  +++ b/fs/cifs/fcntl.c
>  @@ -68,7 +68,7 @@ int cifs_dir_notify(struct file *file, unsigned long arg)
>   {
>         int xid;
>         int rc = -EINVAL;
>  -       int oplock = FALSE;
>  +       int oplock = 0;
>         struct cifs_sb_info *cifs_sb;
>         struct cifsTconInfo *pTcon;
>         char *full_path = NULL;
>  diff --git a/fs/cifs/file.c b/fs/cifs/file.c
>  index b0e7795..2c3a099 100644
>  --- a/fs/cifs/file.c
>  +++ b/fs/cifs/file.c
>  @@ -51,8 +51,8 @@ static inline struct cifsFileInfo *cifs_init_private(
>         INIT_LIST_HEAD(&private_data->llist);
>         private_data->pfile = file; /* needed for writepage */
>         private_data->pInode = inode;
>  -       private_data->invalidHandle = FALSE;
>  -       private_data->closePend = FALSE;
>  +       private_data->invalidHandle = false;
>  +       private_data->closePend = false;
>         /* we have to track num writers to the inode, since writepages
>         does not tell us which handle the write is for so there can
>         be a close (overlapping with write) of the filehandle that
>  @@ -148,12 +148,12 @@ client_can_cache:
>                         full_path, buf, inode->i_sb, xid);
>
>         if ((*oplock & 0xF) == OPLOCK_EXCLUSIVE) {
>  -               pCifsInode->clientCanCacheAll = TRUE;
>  -               pCifsInode->clientCanCacheRead = TRUE;
>  +               pCifsInode->clientCanCacheAll = true;
>  +               pCifsInode->clientCanCacheRead = true;
>                 cFYI(1, ("Exclusive Oplock granted on inode %p",
>                          file->f_path.dentry->d_inode));
>         } else if ((*oplock & 0xF) == OPLOCK_READ)
>  -               pCifsInode->clientCanCacheRead = TRUE;
>  +               pCifsInode->clientCanCacheRead = true;
>
>         return rc;
>   }
>  @@ -247,7 +247,7 @@ int cifs_open(struct inode *inode, struct file *file)
>         if (oplockEnabled)
>                 oplock = REQ_OPLOCK;
>         else
>  -               oplock = FALSE;
>  +               oplock = 0;
>
>         /* BB pass O_SYNC flag through on file attributes .. BB */
>
>  @@ -338,7 +338,7 @@ static int cifs_relock_file(struct cifsFileInfo *cifsFile)
>         return rc;
>   }
>
>  -static int cifs_reopen_file(struct file *file, int can_flush)
>  +static int cifs_reopen_file(struct file *file, bool can_flush)
>   {
>         int rc = -EACCES;
>         int xid, oplock;
>  @@ -359,7 +359,7 @@ static int cifs_reopen_file(struct file *file, int can_flush)
>
>         xid = GetXid();
>         down(&pCifsFile->fh_sem);
>  -       if (pCifsFile->invalidHandle == FALSE) {
>  +       if (!pCifsFile->invalidHandle) {
>                 up(&pCifsFile->fh_sem);
>                 FreeXid(xid);
>                 return 0;
>  @@ -403,7 +403,7 @@ reopen_error_exit:
>         if (oplockEnabled)
>                 oplock = REQ_OPLOCK;
>         else
>  -               oplock = FALSE;
>  +               oplock = 0;
>
>         /* Can not refresh inode by passing in file_info buf to be returned
>            by SMBOpen and then calling get_inode_info with returned buf
>  @@ -420,7 +420,7 @@ reopen_error_exit:
>                 cFYI(1, ("oplock: %d", oplock));
>         } else {
>                 pCifsFile->netfid = netfid;
>  -               pCifsFile->invalidHandle = FALSE;
>  +               pCifsFile->invalidHandle = false;
>                 up(&pCifsFile->fh_sem);
>                 pCifsInode = CIFS_I(inode);
>                 if (pCifsInode) {
>  @@ -430,8 +430,8 @@ reopen_error_exit:
>                                         CIFS_I(inode)->write_behind_rc = rc;
>                         /* temporarily disable caching while we
>                            go to server to get inode info */
>  -                               pCifsInode->clientCanCacheAll = FALSE;
>  -                               pCifsInode->clientCanCacheRead = FALSE;
>  +                               pCifsInode->clientCanCacheAll = false;
>  +                               pCifsInode->clientCanCacheRead = false;
>                                 if (pTcon->unix_ext)
>                                         rc = cifs_get_inode_info_unix(&inode,
>                                                 full_path, inode->i_sb, xid);
>  @@ -446,16 +446,16 @@ reopen_error_exit:
>                              we can not go to the server to get the new inod
>                              info */
>                         if ((oplock & 0xF) == OPLOCK_EXCLUSIVE) {
>  -                               pCifsInode->clientCanCacheAll = TRUE;
>  -                               pCifsInode->clientCanCacheRead = TRUE;
>  +                               pCifsInode->clientCanCacheAll = true;
>  +                               pCifsInode->clientCanCacheRead = true;
>                                 cFYI(1, ("Exclusive Oplock granted on inode %p",
>                                          file->f_path.dentry->d_inode));
>                         } else if ((oplock & 0xF) == OPLOCK_READ) {
>  -                               pCifsInode->clientCanCacheRead = TRUE;
>  -                               pCifsInode->clientCanCacheAll = FALSE;
>  +                               pCifsInode->clientCanCacheRead = true;
>  +                               pCifsInode->clientCanCacheAll = false;
>                         } else {
>  -                               pCifsInode->clientCanCacheRead = FALSE;
>  -                               pCifsInode->clientCanCacheAll = FALSE;
>  +                               pCifsInode->clientCanCacheRead = false;
>  +                               pCifsInode->clientCanCacheAll = false;
>                         }
>                         cifs_relock_file(pCifsFile);
>                 }
>  @@ -482,7 +482,7 @@ int cifs_close(struct inode *inode, struct file *file)
>         if (pSMBFile) {
>                 struct cifsLockInfo *li, *tmp;
>
>  -               pSMBFile->closePend = TRUE;
>  +               pSMBFile->closePend = true;
>                 if (pTcon) {
>                         /* no sense reconnecting to close a file that is
>                            already closed */
>  @@ -551,8 +551,8 @@ int cifs_close(struct inode *inode, struct file *file)
>                 cFYI(1, ("closing last open instance for inode %p", inode));
>                 /* if the file is not open we do not know if we can cache info
>                    on this inode, much less write behind and read ahead */
>  -               CIFS_I(inode)->clientCanCacheRead = FALSE;
>  -               CIFS_I(inode)->clientCanCacheAll  = FALSE;
>  +               CIFS_I(inode)->clientCanCacheRead = false;
>  +               CIFS_I(inode)->clientCanCacheAll  = false;
>         }
>         read_unlock(&GlobalSMBSeslock);
>         if ((rc == 0) && CIFS_I(inode)->write_behind_rc)
>  @@ -581,9 +581,9 @@ int cifs_closedir(struct inode *inode, struct file *file)
>                 pTcon = cifs_sb->tcon;
>
>                 cFYI(1, ("Freeing private data in close dir"));
>  -               if ((pCFileStruct->srch_inf.endOfSearch == FALSE) &&
>  -                  (pCFileStruct->invalidHandle == FALSE)) {
>  -                       pCFileStruct->invalidHandle = TRUE;
>  +               if (!pCFileStruct->srch_inf.endOfSearch &&
>  +                   !pCFileStruct->invalidHandle) {
>  +                       pCFileStruct->invalidHandle = true;
>                         rc = CIFSFindClose(xid, pTcon, pCFileStruct->netfid);
>                         cFYI(1, ("Closing uncompleted readdir with rc %d",
>                                  rc));
>  @@ -635,12 +635,12 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock)
>         __u32 numLock = 0;
>         __u32 numUnlock = 0;
>         __u64 length;
>  -       int wait_flag = FALSE;
>  +       bool wait_flag = false;
>         struct cifs_sb_info *cifs_sb;
>         struct cifsTconInfo *pTcon;
>         __u16 netfid;
>         __u8 lockType = LOCKING_ANDX_LARGE_FILES;
>  -       int posix_locking;
>  +       bool posix_locking;
>
>         length = 1 + pfLock->fl_end - pfLock->fl_start;
>         rc = -EACCES;
>  @@ -657,7 +657,7 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock)
>                 cFYI(1, ("Flock"));
>         if (pfLock->fl_flags & FL_SLEEP) {
>                 cFYI(1, ("Blocking lock"));
>  -               wait_flag = TRUE;
>  +               wait_flag = true;
>         }
>         if (pfLock->fl_flags & FL_ACCESS)
>                 cFYI(1, ("Process suspended by mandatory locking - "
>  @@ -792,7 +792,7 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock)
>                                         stored_rc = CIFSSMBLock(xid, pTcon,
>                                                         netfid,
>                                                         li->length, li->offset,
>  -                                                       1, 0, li->type, FALSE);
>  +                                                       1, 0, li->type, false);
>                                         if (stored_rc)
>                                                 rc = stored_rc;
>
>  @@ -864,7 +864,7 @@ ssize_t cifs_user_write(struct file *file, const char __user *write_data,
>                                    filemap_fdatawait from here so tell
>                                    reopen_file not to flush data to server
>                                    now */
>  -                               rc = cifs_reopen_file(file, FALSE);
>  +                               rc = cifs_reopen_file(file, false);
>                                 if (rc != 0)
>                                         break;
>                         }
>  @@ -964,7 +964,7 @@ static ssize_t cifs_write(struct file *file, const char *write_data,
>                                    filemap_fdatawait from here so tell
>                                    reopen_file not to flush data to
>                                    server now */
>  -                               rc = cifs_reopen_file(file, FALSE);
>  +                               rc = cifs_reopen_file(file, false);
>                                 if (rc != 0)
>                                         break;
>                         }
>  @@ -1091,7 +1091,7 @@ refind_writable:
>
>                         read_unlock(&GlobalSMBSeslock);
>                         /* Had to unlock since following call can block */
>  -                       rc = cifs_reopen_file(open_file->pfile, FALSE);
>  +                       rc = cifs_reopen_file(open_file->pfile, false);
>                         if (!rc) {
>                                 if (!open_file->closePend)
>                                         return open_file;
>  @@ -1606,7 +1606,7 @@ ssize_t cifs_user_read(struct file *file, char __user *read_data,
>                         int buf_type = CIFS_NO_BUFFER;
>                         if ((open_file->invalidHandle) &&
>                             (!open_file->closePend)) {
>  -                               rc = cifs_reopen_file(file, TRUE);
>  +                               rc = cifs_reopen_file(file, true);
>                                 if (rc != 0)
>                                         break;
>                         }
>  @@ -1691,7 +1691,7 @@ static ssize_t cifs_read(struct file *file, char *read_data, size_t read_size,
>                 while (rc == -EAGAIN) {
>                         if ((open_file->invalidHandle) &&
>                             (!open_file->closePend)) {
>  -                               rc = cifs_reopen_file(file, TRUE);
>  +                               rc = cifs_reopen_file(file, true);
>                                 if (rc != 0)
>                                         break;
>                         }
>  @@ -1848,7 +1848,7 @@ static int cifs_readpages(struct file *file, struct address_space *mapping,
>                 while (rc == -EAGAIN) {
>                         if ((open_file->invalidHandle) &&
>                             (!open_file->closePend)) {
>  -                               rc = cifs_reopen_file(file, TRUE);
>  +                               rc = cifs_reopen_file(file, true);
>                                 if (rc != 0)
>                                         break;
>                         }
>  @@ -2007,10 +2007,10 @@ static int is_inode_writable(struct cifsInodeInfo *cifs_inode)
>     refreshing the inode only on increases in the file size
>     but this is tricky to do without racing with writebehind
>     page caching in the current Linux kernel design */
>  -int is_size_safe_to_change(struct cifsInodeInfo *cifsInode, __u64 end_of_file)
>  +bool is_size_safe_to_change(struct cifsInodeInfo *cifsInode, __u64 end_of_file)
>   {
>         if (!cifsInode)
>  -               return 1;
>  +               return true;
>
>         if (is_inode_writable(cifsInode)) {
>                 /* This inode is open for write at least once */
>  @@ -2020,15 +2020,15 @@ int is_size_safe_to_change(struct cifsInodeInfo *cifsInode, __u64 end_of_file)
>                 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DIRECT_IO) {
>                         /* since no page cache to corrupt on directio
>                         we can change size safely */
>  -                       return 1;
>  +                       return true;
>                 }
>
>                 if (i_size_read(&cifsInode->vfs_inode) < end_of_file)
>  -                       return 1;
>  +                       return true;
>
>  -               return 0;
>  +               return false;
>         } else
>  -               return 1;
>  +               return true;
>   }
>
>   static int cifs_prepare_write(struct file *file, struct page *page,
>  diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
>  index 13c728f..d247558 100644
>  --- a/fs/cifs/inode.c
>  +++ b/fs/cifs/inode.c
>  @@ -245,7 +245,7 @@ static int decode_sfu_inode(struct inode *inode, __u64 size,
>                             struct cifs_sb_info *cifs_sb, int xid)
>   {
>         int rc;
>  -       int oplock = FALSE;
>  +       int oplock = 0;
>         __u16 netfid;
>         struct cifsTconInfo *pTcon = cifs_sb->tcon;
>         char buf[24];
>  @@ -353,7 +353,7 @@ int cifs_get_inode_info(struct inode **pinode,
>         struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
>         char *tmp_path;
>         char *buf = NULL;
>  -       int adjustTZ = FALSE;
>  +       bool adjustTZ = false;
>
>         pTcon = cifs_sb->tcon;
>         cFYI(1, ("Getting info on %s", search_path));
>  @@ -383,7 +383,7 @@ int cifs_get_inode_info(struct inode **pinode,
>                         rc = SMBQueryInformation(xid, pTcon, search_path,
>                                                  pfindData, cifs_sb->local_nls,
>                                                  cifs_sb->mnt_cifs_flags);
>  -                       adjustTZ = TRUE;
>  +                       adjustTZ = true;
>                 }
>         }
>         /* dump_mem("\nQPathInfo return data",&findData, sizeof(findData)); */
>  @@ -672,7 +672,7 @@ psx_del_no_retry:
>         } else if (rc == -ENOENT) {
>                 d_drop(direntry);
>         } else if (rc == -ETXTBSY) {
>  -               int oplock = FALSE;
>  +               int oplock = 0;
>                 __u16 netfid;
>
>                 rc = CIFSSMBOpen(xid, pTcon, full_path, FILE_OPEN, DELETE,
>  @@ -702,7 +702,7 @@ psx_del_no_retry:
>                                 rc = -EOPNOTSUPP;
>
>                         if (rc == -EOPNOTSUPP) {
>  -                               int oplock = FALSE;
>  +                               int oplock = 0;
>                                 __u16 netfid;
>                         /*      rc = CIFSSMBSetAttrLegacy(xid, pTcon,
>                                                           full_path,
>  @@ -738,7 +738,7 @@ psx_del_no_retry:
>                                 if (direntry->d_inode)
>                                         drop_nlink(direntry->d_inode);
>                         } else if (rc == -ETXTBSY) {
>  -                               int oplock = FALSE;
>  +                               int oplock = 0;
>                                 __u16 netfid;
>
>                                 rc = CIFSSMBOpen(xid, pTcon, full_path,
>  @@ -1103,7 +1103,7 @@ int cifs_rename(struct inode *source_inode, struct dentry *source_direntry,
>                 cFYI(1, ("rename rc %d", rc));
>
>         if ((rc == -EIO) || (rc == -EEXIST)) {
>  -               int oplock = FALSE;
>  +               int oplock = 0;
>                 __u16 netfid;
>
>                 /* BB FIXME Is Generic Read correct for rename? */
>  @@ -1138,7 +1138,7 @@ int cifs_revalidate(struct dentry *direntry)
>         struct cifsInodeInfo *cifsInode;
>         loff_t local_size;
>         struct timespec local_mtime;
>  -       int invalidate_inode = FALSE;
>  +       bool invalidate_inode = false;
>
>         if (direntry->d_inode == NULL)
>                 return -ENOENT;
>  @@ -1220,7 +1220,7 @@ int cifs_revalidate(struct dentry *direntry)
>                            only ones who could have modified the file and the
>                            server copy is staler than ours */
>                 } else {
>  -                       invalidate_inode = TRUE;
>  +                       invalidate_inode = true;
>                 }
>         }
>
>  @@ -1354,8 +1354,8 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
>         int rc = -EACCES;
>         struct cifsFileInfo *open_file = NULL;
>         FILE_BASIC_INFO time_buf;
>  -       int set_time = FALSE;
>  -       int set_dosattr = FALSE;
>  +       bool set_time = false;
>  +       bool set_dosattr = false;
>         __u64 mode = 0xFFFFFFFFFFFFFFFFULL;
>         __u64 uid = 0xFFFFFFFFFFFFFFFFULL;
>         __u64 gid = 0xFFFFFFFFFFFFFFFFULL;
>  @@ -1415,7 +1415,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
>                         __u16 nfid = open_file->netfid;
>                         __u32 npid = open_file->pid;
>                         rc = CIFSSMBSetFileSize(xid, pTcon, attrs->ia_size,
>  -                                               nfid, npid, FALSE);
>  +                                               nfid, npid, false);
>                         atomic_dec(&open_file->wrtPending);
>                         cFYI(1, ("SetFSize for attrs rc = %d", rc));
>                         if ((rc == -EINVAL) || (rc == -EOPNOTSUPP)) {
>  @@ -1435,13 +1435,13 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
>                            it was found or because there was an error setting
>                            it by handle */
>                         rc = CIFSSMBSetEOF(xid, pTcon, full_path,
>  -                                          attrs->ia_size, FALSE,
>  +                                          attrs->ia_size, false,
>                                            cifs_sb->local_nls,
>                                            cifs_sb->mnt_cifs_flags);
>                         cFYI(1, ("SetEOF by path (setattrs) rc = %d", rc));
>                         if ((rc == -EINVAL) || (rc == -EOPNOTSUPP)) {
>                                 __u16 netfid;
>  -                               int oplock = FALSE;
>  +                               int oplock = 0;
>
>                                 rc = SMBLegacyOpen(xid, pTcon, full_path,
>                                         FILE_OPEN,
>  @@ -1465,7 +1465,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
>
>                 /* Server is ok setting allocation size implicitly - no need
>                    to call:
>  -               CIFSSMBSetEOF(xid, pTcon, full_path, attrs->ia_size, TRUE,
>  +               CIFSSMBSetEOF(xid, pTcon, full_path, attrs->ia_size, true,
>                          cifs_sb->local_nls);
>                    */
>
>  @@ -1512,7 +1512,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
>   #endif
>                         /* not writeable */
>                         if ((cifsInode->cifsAttrs & ATTR_READONLY) == 0) {
>  -                               set_dosattr = TRUE;
>  +                               set_dosattr = true;
>                                 time_buf.Attributes =
>                                         cpu_to_le32(cifsInode->cifsAttrs |
>                                                     ATTR_READONLY);
>  @@ -1522,7 +1522,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
>                         not be able to write to it - so if any write
>                         bit is enabled for user or group or other we
>                         need to at least try to remove r/o dos attr */
>  -                       set_dosattr = TRUE;
>  +                       set_dosattr = true;
>                         time_buf.Attributes = cpu_to_le32(cifsInode->cifsAttrs &
>                                             (~ATTR_READONLY));
>                         /* Windows ignores set to zero */
>  @@ -1536,14 +1536,14 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
>         }
>
>         if (attrs->ia_valid & ATTR_ATIME) {
>  -               set_time = TRUE;
>  +               set_time = true;
>                 time_buf.LastAccessTime =
>                     cpu_to_le64(cifs_UnixTimeToNT(attrs->ia_atime));
>         } else
>                 time_buf.LastAccessTime = 0;
>
>         if (attrs->ia_valid & ATTR_MTIME) {
>  -               set_time = TRUE;
>  +               set_time = true;
>                 time_buf.LastWriteTime =
>                     cpu_to_le64(cifs_UnixTimeToNT(attrs->ia_mtime));
>         } else
>  @@ -1554,7 +1554,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
>            server times */
>
>         if (set_time && (attrs->ia_valid & ATTR_CTIME)) {
>  -               set_time = TRUE;
>  +               set_time = true;
>                 /* Although Samba throws this field away
>                 it may be useful to Windows - but we do
>                 not want to set ctime unless some other
>  @@ -1577,7 +1577,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
>                         rc = -EOPNOTSUPP;
>
>                 if (rc == -EOPNOTSUPP) {
>  -                       int oplock = FALSE;
>  +                       int oplock = 0;
>                         __u16 netfid;
>
>                         cFYI(1, ("calling SetFileInfo since SetPathInfo for "
>  diff --git a/fs/cifs/link.c b/fs/cifs/link.c
>  index 4b5ca5f..98fa3bc 100644
>  --- a/fs/cifs/link.c
>  +++ b/fs/cifs/link.c
>  @@ -228,7 +228,7 @@ cifs_readlink(struct dentry *direntry, char __user *pBuffer, int buflen)
>         struct inode *inode = direntry->d_inode;
>         int rc = -EACCES;
>         int xid;
>  -       int oplock = FALSE;
>  +       int oplock = 0;
>         struct cifs_sb_info *cifs_sb;
>         struct cifsTconInfo *pTcon;
>         char *full_path = NULL;
>  diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
>  index cd9d977..a0b02d1 100644
>  --- a/fs/cifs/misc.c
>  +++ b/fs/cifs/misc.c
>  @@ -496,7 +496,8 @@ checkSMB(struct smb_hdr *smb, __u16 mid, unsigned int length)
>         }
>         return 0;
>   }
>  -int
>  +
>  +bool
>   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;
>  @@ -522,17 +523,17 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv)
>                                 pnotify->Action));  /* BB removeme BB */
>                         /*   cifs_dump_mem("Rcvd notify Data: ",buf,
>                                 sizeof(struct smb_hdr)+60); */
>  -                       return TRUE;
>  +                       return true;
>                 }
>                 if (pSMBr->hdr.Status.CifsError) {
>                         cFYI(1, ("notify err 0x%d",
>                                 pSMBr->hdr.Status.CifsError));
>  -                       return TRUE;
>  +                       return true;
>                 }
>  -               return FALSE;
>  +               return false;
>         }
>         if (pSMB->hdr.Command != SMB_COM_LOCKING_ANDX)
>  -               return FALSE;
>  +               return false;
>         if (pSMB->hdr.Flags & SMBFLG_RESPONSE) {
>                 /* no sense logging error on invalid handle on oplock
>                    break - harmless race between close request and oplock
>  @@ -541,21 +542,21 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv)
>                 if ((NT_STATUS_INVALID_HANDLE) ==
>                    le32_to_cpu(pSMB->hdr.Status.CifsError)) {
>                         cFYI(1, ("invalid handle on oplock break"));
>  -                       return TRUE;
>  +                       return true;
>                 } else if (ERRbadfid ==
>                    le16_to_cpu(pSMB->hdr.Status.DosError.Error)) {
>  -                       return TRUE;
>  +                       return true;
>                 } else {
>  -                       return FALSE; /* on valid oplock brk we get "request" */
>  +                       return false; /* on valid oplock brk we get "request" */
>                 }
>         }
>         if (pSMB->hdr.WordCount != 8)
>  -               return FALSE;
>  +               return false;
>
>         cFYI(1, ("oplock type 0x%d level 0x%d",
>                  pSMB->LockType, pSMB->OplockLevel));
>         if (!(pSMB->LockType & LOCKING_ANDX_OPLOCK_RELEASE))
>  -               return FALSE;
>  +               return false;
>
>         /* look up tcon based on tid & uid */
>         read_lock(&GlobalSMBSeslock);
>  @@ -573,11 +574,11 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv)
>                                             ("file id match, oplock break"));
>                                         pCifsInode =
>                                                 CIFS_I(netfile->pInode);
>  -                                       pCifsInode->clientCanCacheAll = FALSE;
>  +                                       pCifsInode->clientCanCacheAll = false;
>                                         if (pSMB->OplockLevel == 0)
>                                                 pCifsInode->clientCanCacheRead
>  -                                                       = FALSE;
>  -                                       pCifsInode->oplockPending = TRUE;
>  +                                                       = false;
>  +                                       pCifsInode->oplockPending = true;
>                                         AllocOplockQEntry(netfile->pInode,
>                                                           netfile->netfid,
>                                                           tcon);
>  @@ -585,17 +586,17 @@ is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv)
>                                             ("about to wake up oplock thread"));
>                                         if (oplockThread)
>                                             wake_up_process(oplockThread);
>  -                                       return TRUE;
>  +                                       return true;
>                                 }
>                         }
>                         read_unlock(&GlobalSMBSeslock);
>                         cFYI(1, ("No matching file for oplock break"));
>  -                       return TRUE;
>  +                       return true;
>                 }
>         }
>         read_unlock(&GlobalSMBSeslock);
>         cFYI(1, ("Can not process oplock break for non-existent connection"));
>  -       return TRUE;
>  +       return true;
>   }
>
>   void
>  diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
>  index 38811ce..06dda4b 100644
>  --- a/fs/cifs/readdir.c
>  +++ b/fs/cifs/readdir.c
>  @@ -447,8 +447,8 @@ static int initiate_cifs_search(const int xid, struct file *file)
>         if (file->private_data == NULL)
>                 return -ENOMEM;
>         cifsFile = file->private_data;
>  -       cifsFile->invalidHandle = TRUE;
>  -       cifsFile->srch_inf.endOfSearch = FALSE;
>  +       cifsFile->invalidHandle = true;
>  +       cifsFile->srch_inf.endOfSearch = false;
>
>         cifs_sb = CIFS_SB(file->f_path.dentry->d_sb);
>         if (cifs_sb == NULL)
>  @@ -484,7 +484,7 @@ ffirst_retry:
>                            &cifsFile->netfid, &cifsFile->srch_inf,
>                            cifs_sb->mnt_cifs_flags, CIFS_DIR_SEP(cifs_sb));
>         if (rc == 0)
>  -               cifsFile->invalidHandle = FALSE;
>  +               cifsFile->invalidHandle = false;
>         if ((rc == -EOPNOTSUPP) &&
>                 (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM)) {
>                 cifs_sb->mnt_cifs_flags &= ~CIFS_MOUNT_SERVER_INUM;
>  @@ -669,7 +669,7 @@ static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon,
>            (index_to_find < first_entry_in_buffer)) {
>                 /* close and restart search */
>                 cFYI(1, ("search backing up - close and restart search"));
>  -               cifsFile->invalidHandle = TRUE;
>  +               cifsFile->invalidHandle = true;
>                 CIFSFindClose(xid, pTcon, cifsFile->netfid);
>                 kfree(cifsFile->search_resume_name);
>                 cifsFile->search_resume_name = NULL;
>  @@ -691,7 +691,7 @@ static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon,
>         }
>
>         while ((index_to_find >= cifsFile->srch_inf.index_of_last_entry) &&
>  -             (rc == 0) && (cifsFile->srch_inf.endOfSearch == FALSE)) {
>  +             (rc == 0) && !cifsFile->srch_inf.endOfSearch) {
>                 cFYI(1, ("calling findnext2"));
>                 rc = CIFSFindNext(xid, pTcon, cifsFile->netfid,
>                                   &cifsFile->srch_inf);
>  @@ -1037,7 +1037,7 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir)
>                                 break;
>                         }
>                 } /* else {
>  -                       cifsFile->invalidHandle = TRUE;
>  +                       cifsFile->invalidHandle = true;
>                         CIFSFindClose(xid, pTcon, cifsFile->netfid);
>                 }
>                 kfree(cifsFile->search_resume_name);
>  diff --git a/fs/cifs/smbencrypt.c b/fs/cifs/smbencrypt.c
>  index 58bbfd9..ff3232f 100644
>  --- a/fs/cifs/smbencrypt.c
>  +++ b/fs/cifs/smbencrypt.c
>  @@ -35,11 +35,11 @@
>   #include "cifs_debug.h"
>   #include "cifsencrypt.h"
>
>  -#ifndef FALSE
>  -#define FALSE 0
>  +#ifndef false
>  +#define false 0
>   #endif
>  -#ifndef TRUE
>  -#define TRUE 1
>  +#ifndef true
>  +#define true 1
>   #endif
>
>   /* following came from the other byteorder.h to avoid include conflicts */
>  diff --git a/fs/cifs/xattr.c b/fs/cifs/xattr.c
>  index 5122683..b48680c 100644
>  --- a/fs/cifs/xattr.c
>  +++ b/fs/cifs/xattr.c
>  @@ -262,7 +262,7 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name,
>   #ifdef CONFIG_CIFS_EXPERIMENTAL
>                 else if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) {
>                         __u16 fid;
>  -                       int oplock = FALSE;
>  +                       int oplock = 0;
>                         struct cifs_ntsd *pacl = NULL;
>                         __u32 buflen = 0;
>                         if (experimEnabled)
>  --
>  1.5.4.rc2
>
>



-- 
Thanks,

Steve

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-04-29  0:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-20  1:11 [PATCH 1/4] fs/cifs - Pass cifs_sb->mnt_cifs_flags instead of cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR Joe Perches
2008-03-20  1:11 ` [PATCH 2/4] fs/cifs - Use bool Joe Perches
2008-03-20  1:11   ` [PATCH 3/4] fs/cifs - Remove an indent level, use normal kthread_run arguments Joe Perches
2008-03-20  1:11     ` [PATCH 4/4] fs/cifs - Align case labels to switch Joe Perches
2008-04-29  0:07   ` [PATCH 2/4] fs/cifs - Use bool Steve French

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).