cifs: remove rfc1002 header from smb2_lease_ack
Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com> Signed-off-by: Steve French <smfrench@gmail.com> Reviewed-by: Aurelien Aptel <aaptel@suse.com> Acked-by: Pavel Shilovsky <pshilov@microsoft.com>
This commit is contained in:
parent
5dfe69a407
commit
8eb7998e79
@ -3583,24 +3583,35 @@ SMB2_lease_break(const unsigned int xid, struct cifs_tcon *tcon,
|
|||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
struct smb2_lease_ack *req = NULL;
|
struct smb2_lease_ack *req = NULL;
|
||||||
|
struct cifs_ses *ses = tcon->ses;
|
||||||
int flags = CIFS_OBREAK_OP;
|
int flags = CIFS_OBREAK_OP;
|
||||||
|
unsigned int total_len;
|
||||||
|
struct kvec iov[1];
|
||||||
|
struct kvec rsp_iov;
|
||||||
|
int resp_buf_type;
|
||||||
|
|
||||||
cifs_dbg(FYI, "SMB2_lease_break\n");
|
cifs_dbg(FYI, "SMB2_lease_break\n");
|
||||||
rc = small_smb2_init(SMB2_OPLOCK_BREAK, tcon, (void **) &req);
|
rc = smb2_plain_req_init(SMB2_OPLOCK_BREAK, tcon, (void **) &req,
|
||||||
|
&total_len);
|
||||||
if (rc)
|
if (rc)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
if (encryption_required(tcon))
|
if (encryption_required(tcon))
|
||||||
flags |= CIFS_TRANSFORM_REQ;
|
flags |= CIFS_TRANSFORM_REQ;
|
||||||
|
|
||||||
req->hdr.sync_hdr.CreditRequest = cpu_to_le16(1);
|
req->sync_hdr.CreditRequest = cpu_to_le16(1);
|
||||||
req->StructureSize = cpu_to_le16(36);
|
req->StructureSize = cpu_to_le16(36);
|
||||||
inc_rfc1001_len(req, 12);
|
total_len += 12;
|
||||||
|
|
||||||
memcpy(req->LeaseKey, lease_key, 16);
|
memcpy(req->LeaseKey, lease_key, 16);
|
||||||
req->LeaseState = lease_state;
|
req->LeaseState = lease_state;
|
||||||
|
|
||||||
rc = SendReceiveNoRsp(xid, tcon->ses, (char *) req, flags);
|
flags |= CIFS_NO_RESP;
|
||||||
|
|
||||||
|
iov[0].iov_base = (char *)req;
|
||||||
|
iov[0].iov_len = total_len;
|
||||||
|
|
||||||
|
rc = smb2_send_recv(xid, ses, iov, 1, &resp_buf_type, flags, &rsp_iov);
|
||||||
cifs_small_buf_release(req);
|
cifs_small_buf_release(req);
|
||||||
|
|
||||||
if (rc) {
|
if (rc) {
|
||||||
|
@ -1069,7 +1069,7 @@ struct smb2_lease_break {
|
|||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
struct smb2_lease_ack {
|
struct smb2_lease_ack {
|
||||||
struct smb2_hdr hdr;
|
struct smb2_sync_hdr sync_hdr;
|
||||||
__le16 StructureSize; /* Must be 36 */
|
__le16 StructureSize; /* Must be 36 */
|
||||||
__le16 Reserved;
|
__le16 Reserved;
|
||||||
__le32 Flags;
|
__le32 Flags;
|
||||||
|
Loading…
Reference in New Issue
Block a user