Commit 25911d2c authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

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

Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.org.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 672017f4
...@@ -840,7 +840,7 @@ typedef struct smb_com_delete_file_rsp { ...@@ -840,7 +840,7 @@ typedef struct smb_com_delete_file_rsp {
typedef struct smb_com_delete_directory_req { typedef struct smb_com_delete_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];
} DELETE_DIRECTORY_REQ; } DELETE_DIRECTORY_REQ;
......
...@@ -487,10 +487,9 @@ CIFSSMBRmDir(const int xid, struct cifsTconInfo *tcon, ...@@ -487,10 +487,9 @@ CIFSSMBRmDir(const int xid, struct cifsTconInfo *tcon,
strncpy(pSMB->DirName, dirName, name_len); strncpy(pSMB->DirName, dirName, name_len);
} }
pSMB->ByteCount = name_len + 1;
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