Commit 60e1981a authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

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

Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.org.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 72b8796e
......@@ -768,8 +768,8 @@ typedef struct smb_com_lock_rsp {
typedef struct smb_com_rename_req {
struct smb_hdr hdr; /* wct = 1 */
__u16 SearchAttributes; /* target file attributes */
__u16 ByteCount;
__le16 SearchAttributes; /* target file attributes */
__le16 ByteCount;
__u8 BufferFormat; /* 4 = ASCII or Unicode */
unsigned char OldFileName[1];
/* followed by __u8 BufferFormat2 */
......
......@@ -899,6 +899,7 @@ CIFSSMBRename(const int xid, struct cifsTconInfo *tcon,
RENAME_RSP *pSMBr = NULL;
int bytes_returned;
int name_len, name_len2;
__u16 count;
cFYI(1, ("In CIFSSMBRename"));
renameRetry:
......@@ -940,9 +941,9 @@ CIFSSMBRename(const int xid, struct cifsTconInfo *tcon,
name_len2++; /* signature byte */
}
pSMB->ByteCount = 1 /* 1st signature byte */ + name_len + name_len2;
pSMB->hdr.smb_buf_length += pSMB->ByteCount;
pSMB->ByteCount = cpu_to_le16(pSMB->ByteCount);
count = 1 /* 1st signature byte */ + name_len + name_len2;
pSMB->hdr.smb_buf_length += count;
pSMB->ByteCount = cpu_to_le16(count);
rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
(struct smb_hdr *) pSMBr, &bytes_returned, 0);
......
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