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 { ...@@ -768,8 +768,8 @@ typedef struct smb_com_lock_rsp {
typedef struct smb_com_rename_req { typedef struct smb_com_rename_req {
struct smb_hdr hdr; /* wct = 1 */ struct smb_hdr hdr; /* wct = 1 */
__u16 SearchAttributes; /* target file attributes */ __le16 SearchAttributes; /* target file attributes */
__u16 ByteCount; __le16 ByteCount;
__u8 BufferFormat; /* 4 = ASCII or Unicode */ __u8 BufferFormat; /* 4 = ASCII or Unicode */
unsigned char OldFileName[1]; unsigned char OldFileName[1];
/* followed by __u8 BufferFormat2 */ /* followed by __u8 BufferFormat2 */
......
...@@ -899,6 +899,7 @@ CIFSSMBRename(const int xid, struct cifsTconInfo *tcon, ...@@ -899,6 +899,7 @@ CIFSSMBRename(const int xid, struct cifsTconInfo *tcon,
RENAME_RSP *pSMBr = NULL; RENAME_RSP *pSMBr = NULL;
int bytes_returned; int bytes_returned;
int name_len, name_len2; int name_len, name_len2;
__u16 count;
cFYI(1, ("In CIFSSMBRename")); cFYI(1, ("In CIFSSMBRename"));
renameRetry: renameRetry:
...@@ -940,9 +941,9 @@ CIFSSMBRename(const int xid, struct cifsTconInfo *tcon, ...@@ -940,9 +941,9 @@ CIFSSMBRename(const int xid, struct cifsTconInfo *tcon,
name_len2++; /* signature byte */ name_len2++; /* signature byte */
} }
pSMB->ByteCount = 1 /* 1st signature byte */ + name_len + name_len2; count = 1 /* 1st signature byte */ + name_len + name_len2;
pSMB->hdr.smb_buf_length += pSMB->ByteCount; pSMB->hdr.smb_buf_length += count;
pSMB->ByteCount = cpu_to_le16(pSMB->ByteCount); pSMB->ByteCount = cpu_to_le16(count);
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);
......
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