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.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 9b8b4cfdf993..4511b708f0f3 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -1728,7 +1728,7 @@ CIFSSMBLock(const int xid, struct cifsTconInfo *tcon,
1728{ 1728{
1729 int rc = 0; 1729 int rc = 0;
1730 LOCK_REQ *pSMB = NULL; 1730 LOCK_REQ *pSMB = NULL;
1731 LOCK_RSP *pSMBr = NULL; 1731/* LOCK_RSP *pSMBr = NULL; */ /* No response data other than rc to parse */
1732 int bytes_returned; 1732 int bytes_returned;
1733 int timeout = 0; 1733 int timeout = 0;
1734 __u16 count; 1734 __u16 count;
@@ -1739,8 +1739,6 @@ CIFSSMBLock(const int xid, struct cifsTconInfo *tcon,
1739 if (rc) 1739 if (rc)
1740 return rc; 1740 return rc;
1741 1741
1742 pSMBr = (LOCK_RSP *)pSMB; /* BB removeme BB */
1743
1744 if (lockType == LOCKING_ANDX_OPLOCK_RELEASE) { 1742 if (lockType == LOCKING_ANDX_OPLOCK_RELEASE) {
1745 timeout = CIFS_ASYNC_OP; /* no response expected */ 1743 timeout = CIFS_ASYNC_OP; /* no response expected */
1746 pSMB->Timeout = 0; 1744 pSMB->Timeout = 0;
@@ -1774,7 +1772,7 @@ CIFSSMBLock(const int xid, struct cifsTconInfo *tcon,
1774 1772
1775 if (waitFlag) { 1773 if (waitFlag) {
1776 rc = SendReceiveBlockingLock(xid, tcon, (struct smb_hdr *) pSMB, 1774 rc = SendReceiveBlockingLock(xid, tcon, (struct smb_hdr *) pSMB,
1777 (struct smb_hdr *) pSMBr, &bytes_returned); 1775 (struct smb_hdr *) pSMB, &bytes_returned);
1778 cifs_small_buf_release(pSMB); 1776 cifs_small_buf_release(pSMB);
1779 } else { 1777 } else {
1780 rc = SendReceiveNoRsp(xid, tcon->ses, (struct smb_hdr *)pSMB, 1778 rc = SendReceiveNoRsp(xid, tcon->ses, (struct smb_hdr *)pSMB,
@@ -3927,9 +3925,9 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr,
3927 } 3925 }
3928 3926
3929 ref = (struct dfs_referral_level_3 *) &(pSMBr->referrals); 3927 ref = (struct dfs_referral_level_3 *) &(pSMBr->referrals);
3930 if (ref->VersionNumber != 3) { 3928 if (ref->VersionNumber != cpu_to_le16(3)) {
3931 cERROR(1, ("Referrals of V%d version are not supported," 3929 cERROR(1, ("Referrals of V%d version are not supported,"
3932 "should be V3", ref->VersionNumber)); 3930 "should be V3", le16_to_cpu(ref->VersionNumber)));
3933 rc = -EINVAL; 3931 rc = -EINVAL;
3934 goto parse_DFS_referrals_exit; 3932 goto parse_DFS_referrals_exit;
3935 } 3933 }
@@ -3977,7 +3975,7 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr,
3977 if (rc) 3975 if (rc)
3978 goto parse_DFS_referrals_exit; 3976 goto parse_DFS_referrals_exit;
3979 3977
3980 ref += ref->Size; 3978 ref += le16_to_cpu(ref->Size);
3981 } 3979 }
3982 3980
3983parse_DFS_referrals_exit: 3981parse_DFS_referrals_exit: