Commit 6e9e9e24 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

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

Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.org.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ab588b43
...@@ -810,10 +810,10 @@ typedef struct smb_com_copy_rsp { ...@@ -810,10 +810,10 @@ typedef struct smb_com_copy_rsp {
typedef struct smb_com_nt_rename_req { /* A5 - also used for create hardlink */ typedef struct smb_com_nt_rename_req { /* A5 - also used for create hardlink */
struct smb_hdr hdr; /* wct = 4 */ struct smb_hdr hdr; /* wct = 4 */
__u16 SearchAttributes; /* target file attributes */ __le16 SearchAttributes; /* target file attributes */
__u16 Flags; /* spec says Information Level */ __le16 Flags; /* spec says Information Level */
__u32 ClusterCount; __le32 ClusterCount;
__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 */
......
...@@ -1306,6 +1306,7 @@ CIFSCreateHardLink(const int xid, struct cifsTconInfo *tcon, ...@@ -1306,6 +1306,7 @@ CIFSCreateHardLink(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 CIFSCreateHardLink")); cFYI(1, ("In CIFSCreateHardLink"));
winCreateHardLinkRetry: winCreateHardLinkRetry:
...@@ -1350,9 +1351,9 @@ CIFSCreateHardLink(const int xid, struct cifsTconInfo *tcon, ...@@ -1350,9 +1351,9 @@ CIFSCreateHardLink(const int xid, struct cifsTconInfo *tcon,
name_len2++; /* signature byte */ name_len2++; /* signature byte */
} }
pSMB->ByteCount = 1 /* string type byte */ + name_len + name_len2; count = 1 /* string type 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