Commit afcccefd authored by Ronnie Sahlberg's avatar Ronnie Sahlberg Committed by Steve French

cifs: remove rfc1002 header from smb2_close_req

Signed-off-by: default avatarRonnie Sahlberg <lsahlber@redhat.com>
Reviewed-by: default avatarAurelien Aptel <aaptel@suse.com>
Signed-off-by: default avatarSteve French <smfrench@gmail.com>
Acked-by: default avatarPavel Shilovsky <pshilov@microsoft.com>
parent 4eecf4cf
...@@ -2094,13 +2094,14 @@ SMB2_close(const unsigned int xid, struct cifs_tcon *tcon, ...@@ -2094,13 +2094,14 @@ SMB2_close(const unsigned int xid, struct cifs_tcon *tcon,
int resp_buftype; int resp_buftype;
int rc = 0; int rc = 0;
int flags = 0; int flags = 0;
unsigned int total_len;
cifs_dbg(FYI, "Close\n"); cifs_dbg(FYI, "Close\n");
if (!ses || !(ses->server)) if (!ses || !(ses->server))
return -EIO; return -EIO;
rc = small_smb2_init(SMB2_CLOSE, tcon, (void **) &req); rc = smb2_plain_req_init(SMB2_CLOSE, tcon, (void **) &req, &total_len);
if (rc) if (rc)
return rc; return rc;
...@@ -2111,10 +2112,9 @@ SMB2_close(const unsigned int xid, struct cifs_tcon *tcon, ...@@ -2111,10 +2112,9 @@ SMB2_close(const unsigned int xid, struct cifs_tcon *tcon,
req->VolatileFileId = volatile_fid; req->VolatileFileId = volatile_fid;
iov[0].iov_base = (char *)req; iov[0].iov_base = (char *)req;
/* 4 for rfc1002 length field */ iov[0].iov_len = total_len;
iov[0].iov_len = get_rfc1002_length(req) + 4;
rc = SendReceive2(xid, ses, iov, 1, &resp_buftype, flags, &rsp_iov); rc = smb2_send_recv(xid, ses, iov, 1, &resp_buftype, flags, &rsp_iov);
cifs_small_buf_release(req); cifs_small_buf_release(req);
rsp = (struct smb2_close_rsp *)rsp_iov.iov_base; rsp = (struct smb2_close_rsp *)rsp_iov.iov_base;
......
...@@ -789,7 +789,7 @@ struct smb2_ioctl_rsp { ...@@ -789,7 +789,7 @@ struct smb2_ioctl_rsp {
/* Currently defined values for close flags */ /* Currently defined values for close flags */
#define SMB2_CLOSE_FLAG_POSTQUERY_ATTRIB cpu_to_le16(0x0001) #define SMB2_CLOSE_FLAG_POSTQUERY_ATTRIB cpu_to_le16(0x0001)
struct smb2_close_req { struct smb2_close_req {
struct smb2_hdr hdr; struct smb2_sync_hdr sync_hdr;
__le16 StructureSize; /* Must be 24 */ __le16 StructureSize; /* Must be 24 */
__le16 Flags; __le16 Flags;
__le32 Reserved; __le32 Reserved;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment