Commit 10021c53 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] cifs: annotate CREATE_DIRECTORY_{REQ,RESP}

Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.org.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 25911d2c
...@@ -852,7 +852,7 @@ typedef struct smb_com_delete_directory_rsp { ...@@ -852,7 +852,7 @@ typedef struct smb_com_delete_directory_rsp {
typedef struct smb_com_create_directory_req { typedef struct smb_com_create_directory_req {
struct smb_hdr hdr; /* wct = 0 */ struct smb_hdr hdr; /* wct = 0 */
__u16 ByteCount; __le16 ByteCount;
__u8 BufferFormat; /* 4 = ASCII */ __u8 BufferFormat; /* 4 = ASCII */
unsigned char DirName[1]; unsigned char DirName[1];
} CREATE_DIRECTORY_REQ; } CREATE_DIRECTORY_REQ;
......
...@@ -537,10 +537,9 @@ CIFSSMBMkDir(const int xid, struct cifsTconInfo *tcon, ...@@ -537,10 +537,9 @@ CIFSSMBMkDir(const int xid, struct cifsTconInfo *tcon,
strncpy(pSMB->DirName, name, name_len); strncpy(pSMB->DirName, name, name_len);
} }
pSMB->ByteCount = name_len + 1 /* for buf format */ ;
pSMB->BufferFormat = 0x04; pSMB->BufferFormat = 0x04;
pSMB->hdr.smb_buf_length += pSMB->ByteCount; pSMB->hdr.smb_buf_length += name_len + 1;
pSMB->ByteCount = cpu_to_le16(pSMB->ByteCount); pSMB->ByteCount = cpu_to_le16(name_len + 1);
rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
(struct smb_hdr *) pSMBr, &bytes_returned, 0); (struct smb_hdr *) pSMBr, &bytes_returned, 0);
if (rc) { if (rc) {
......
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