aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifssmb.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/cifssmb.c')
-rw-r--r--fs/cifs/cifssmb.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 4728fa982a4e..cfd9750852b3 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -95,7 +95,7 @@ static void mark_open_files_invalid(struct cifsTconInfo *pTcon)
95 list_for_each_safe(tmp, tmp1, &pTcon->openFileList) { 95 list_for_each_safe(tmp, tmp1, &pTcon->openFileList) {
96 open_file = list_entry(tmp, struct cifsFileInfo, tlist); 96 open_file = list_entry(tmp, struct cifsFileInfo, tlist);
97 if (open_file) 97 if (open_file)
98 open_file->invalidHandle = TRUE; 98 open_file->invalidHandle = true;
99 } 99 }
100 write_unlock(&GlobalSMBSeslock); 100 write_unlock(&GlobalSMBSeslock);
101 /* BB Add call to invalidate_inodes(sb) for all superblocks mounted 101 /* 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,
141 if (tcon->ses->server->tcpStatus == 141 if (tcon->ses->server->tcpStatus ==
142 CifsNeedReconnect) { 142 CifsNeedReconnect) {
143 /* on "soft" mounts we wait once */ 143 /* on "soft" mounts we wait once */
144 if ((tcon->retry == FALSE) || 144 if (!tcon->retry ||
145 (tcon->ses->status == CifsExiting)) { 145 (tcon->ses->status == CifsExiting)) {
146 cFYI(1, ("gave up waiting on " 146 cFYI(1, ("gave up waiting on "
147 "reconnect in smb_init")); 147 "reconnect in smb_init"));
@@ -289,7 +289,7 @@ smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
289 if (tcon->ses->server->tcpStatus == 289 if (tcon->ses->server->tcpStatus ==
290 CifsNeedReconnect) { 290 CifsNeedReconnect) {
291 /* on "soft" mounts we wait once */ 291 /* on "soft" mounts we wait once */
292 if ((tcon->retry == FALSE) || 292 if (!tcon->retry ||
293 (tcon->ses->status == CifsExiting)) { 293 (tcon->ses->status == CifsExiting)) {
294 cFYI(1, ("gave up waiting on " 294 cFYI(1, ("gave up waiting on "
295 "reconnect in smb_init")); 295 "reconnect in smb_init"));
@@ -1686,7 +1686,7 @@ int
1686CIFSSMBLock(const int xid, struct cifsTconInfo *tcon, 1686CIFSSMBLock(const int xid, struct cifsTconInfo *tcon,
1687 const __u16 smb_file_id, const __u64 len, 1687 const __u16 smb_file_id, const __u64 len,
1688 const __u64 offset, const __u32 numUnlock, 1688 const __u64 offset, const __u32 numUnlock,
1689 const __u32 numLock, const __u8 lockType, const int waitFlag) 1689 const __u32 numLock, const __u8 lockType, const bool waitFlag)
1690{ 1690{
1691 int rc = 0; 1691 int rc = 0;
1692 LOCK_REQ *pSMB = NULL; 1692 LOCK_REQ *pSMB = NULL;
@@ -1695,7 +1695,7 @@ CIFSSMBLock(const int xid, struct cifsTconInfo *tcon,
1695 int timeout = 0; 1695 int timeout = 0;
1696 __u16 count; 1696 __u16 count;
1697 1697
1698 cFYI(1, ("CIFSSMBLock timeout %d numLock %d", waitFlag, numLock)); 1698 cFYI(1, ("CIFSSMBLock timeout %d numLock %d", (int)waitFlag, numLock));
1699 rc = small_smb_init(SMB_COM_LOCKING_ANDX, 8, tcon, (void **) &pSMB); 1699 rc = small_smb_init(SMB_COM_LOCKING_ANDX, 8, tcon, (void **) &pSMB);
1700 1700
1701 if (rc) 1701 if (rc)
@@ -1706,7 +1706,7 @@ CIFSSMBLock(const int xid, struct cifsTconInfo *tcon,
1706 if (lockType == LOCKING_ANDX_OPLOCK_RELEASE) { 1706 if (lockType == LOCKING_ANDX_OPLOCK_RELEASE) {
1707 timeout = CIFS_ASYNC_OP; /* no response expected */ 1707 timeout = CIFS_ASYNC_OP; /* no response expected */
1708 pSMB->Timeout = 0; 1708 pSMB->Timeout = 0;
1709 } else if (waitFlag == TRUE) { 1709 } else if (waitFlag) {
1710 timeout = CIFS_BLOCKING_OP; /* blocking operation, no timeout */ 1710 timeout = CIFS_BLOCKING_OP; /* blocking operation, no timeout */
1711 pSMB->Timeout = cpu_to_le32(-1);/* blocking - do not time out */ 1711 pSMB->Timeout = cpu_to_le32(-1);/* blocking - do not time out */
1712 } else { 1712 } else {
@@ -1756,7 +1756,7 @@ int
1756CIFSSMBPosixLock(const int xid, struct cifsTconInfo *tcon, 1756CIFSSMBPosixLock(const int xid, struct cifsTconInfo *tcon,
1757 const __u16 smb_file_id, const int get_flag, const __u64 len, 1757 const __u16 smb_file_id, const int get_flag, const __u64 len,
1758 struct file_lock *pLockData, const __u16 lock_type, 1758 struct file_lock *pLockData, const __u16 lock_type,
1759 const int waitFlag) 1759 const bool waitFlag)
1760{ 1760{
1761 struct smb_com_transaction2_sfi_req *pSMB = NULL; 1761 struct smb_com_transaction2_sfi_req *pSMB = NULL;
1762 struct smb_com_transaction2_sfi_rsp *pSMBr = NULL; 1762 struct smb_com_transaction2_sfi_rsp *pSMBr = NULL;
@@ -3581,9 +3581,9 @@ findFirstRetry:
3581 rc = validate_t2((struct smb_t2_rsp *)pSMBr); 3581 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
3582 if (rc == 0) { 3582 if (rc == 0) {
3583 if (pSMBr->hdr.Flags2 & SMBFLG2_UNICODE) 3583 if (pSMBr->hdr.Flags2 & SMBFLG2_UNICODE)
3584 psrch_inf->unicode = TRUE; 3584 psrch_inf->unicode = true;
3585 else 3585 else
3586 psrch_inf->unicode = FALSE; 3586 psrch_inf->unicode = false;
3587 3587
3588 psrch_inf->ntwrk_buf_start = (char *)pSMBr; 3588 psrch_inf->ntwrk_buf_start = (char *)pSMBr;
3589 psrch_inf->smallBuf = 0; 3589 psrch_inf->smallBuf = 0;
@@ -3594,9 +3594,9 @@ findFirstRetry:
3594 le16_to_cpu(pSMBr->t2.ParameterOffset)); 3594 le16_to_cpu(pSMBr->t2.ParameterOffset));
3595 3595
3596 if (parms->EndofSearch) 3596 if (parms->EndofSearch)
3597 psrch_inf->endOfSearch = TRUE; 3597 psrch_inf->endOfSearch = true;
3598 else 3598 else
3599 psrch_inf->endOfSearch = FALSE; 3599 psrch_inf->endOfSearch = false;
3600 3600
3601 psrch_inf->entries_in_buffer = 3601 psrch_inf->entries_in_buffer =
3602 le16_to_cpu(parms->SearchCount); 3602 le16_to_cpu(parms->SearchCount);
@@ -3624,7 +3624,7 @@ int CIFSFindNext(const int xid, struct cifsTconInfo *tcon,
3624 3624
3625 cFYI(1, ("In FindNext")); 3625 cFYI(1, ("In FindNext"));
3626 3626
3627 if (psrch_inf->endOfSearch == TRUE) 3627 if (psrch_inf->endOfSearch)
3628 return -ENOENT; 3628 return -ENOENT;
3629 3629
3630 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB, 3630 rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB,
@@ -3682,7 +3682,7 @@ int CIFSFindNext(const int xid, struct cifsTconInfo *tcon,
3682 cifs_stats_inc(&tcon->num_fnext); 3682 cifs_stats_inc(&tcon->num_fnext);
3683 if (rc) { 3683 if (rc) {
3684 if (rc == -EBADF) { 3684 if (rc == -EBADF) {
3685 psrch_inf->endOfSearch = TRUE; 3685 psrch_inf->endOfSearch = true;
3686 rc = 0; /* search probably was closed at end of search*/ 3686 rc = 0; /* search probably was closed at end of search*/
3687 } else 3687 } else
3688 cFYI(1, ("FindNext returned = %d", rc)); 3688 cFYI(1, ("FindNext returned = %d", rc));
@@ -3692,9 +3692,9 @@ int CIFSFindNext(const int xid, struct cifsTconInfo *tcon,
3692 if (rc == 0) { 3692 if (rc == 0) {
3693 /* BB fixme add lock for file (srch_info) struct here */ 3693 /* BB fixme add lock for file (srch_info) struct here */
3694 if (pSMBr->hdr.Flags2 & SMBFLG2_UNICODE) 3694 if (pSMBr->hdr.Flags2 & SMBFLG2_UNICODE)
3695 psrch_inf->unicode = TRUE; 3695 psrch_inf->unicode = true;
3696 else 3696 else
3697 psrch_inf->unicode = FALSE; 3697 psrch_inf->unicode = false;
3698 response_data = (char *) &pSMBr->hdr.Protocol + 3698 response_data = (char *) &pSMBr->hdr.Protocol +
3699 le16_to_cpu(pSMBr->t2.ParameterOffset); 3699 le16_to_cpu(pSMBr->t2.ParameterOffset);
3700 parms = (T2_FNEXT_RSP_PARMS *)response_data; 3700 parms = (T2_FNEXT_RSP_PARMS *)response_data;
@@ -3709,9 +3709,9 @@ int CIFSFindNext(const int xid, struct cifsTconInfo *tcon,
3709 psrch_inf->ntwrk_buf_start = (char *)pSMB; 3709 psrch_inf->ntwrk_buf_start = (char *)pSMB;
3710 psrch_inf->smallBuf = 0; 3710 psrch_inf->smallBuf = 0;
3711 if (parms->EndofSearch) 3711 if (parms->EndofSearch)
3712 psrch_inf->endOfSearch = TRUE; 3712 psrch_inf->endOfSearch = true;
3713 else 3713 else
3714 psrch_inf->endOfSearch = FALSE; 3714 psrch_inf->endOfSearch = false;
3715 psrch_inf->entries_in_buffer = 3715 psrch_inf->entries_in_buffer =
3716 le16_to_cpu(parms->SearchCount); 3716 le16_to_cpu(parms->SearchCount);
3717 psrch_inf->index_of_last_entry += 3717 psrch_inf->index_of_last_entry +=
@@ -4586,7 +4586,7 @@ QFSPosixRetry:
4586 4586
4587int 4587int
4588CIFSSMBSetEOF(const int xid, struct cifsTconInfo *tcon, const char *fileName, 4588CIFSSMBSetEOF(const int xid, struct cifsTconInfo *tcon, const char *fileName,
4589 __u64 size, int SetAllocation, 4589 __u64 size, bool SetAllocation,
4590 const struct nls_table *nls_codepage, int remap) 4590 const struct nls_table *nls_codepage, int remap)
4591{ 4591{
4592 struct smb_com_transaction2_spi_req *pSMB = NULL; 4592 struct smb_com_transaction2_spi_req *pSMB = NULL;
@@ -4675,7 +4675,7 @@ SetEOFRetry:
4675 4675
4676int 4676int
4677CIFSSMBSetFileSize(const int xid, struct cifsTconInfo *tcon, __u64 size, 4677CIFSSMBSetFileSize(const int xid, struct cifsTconInfo *tcon, __u64 size,
4678 __u16 fid, __u32 pid_of_opener, int SetAllocation) 4678 __u16 fid, __u32 pid_of_opener, bool SetAllocation)
4679{ 4679{
4680 struct smb_com_transaction2_sfi_req *pSMB = NULL; 4680 struct smb_com_transaction2_sfi_req *pSMB = NULL;
4681 char *data_offset; 4681 char *data_offset;