Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298637
b: refs/heads/master
c: b2a3ad9
h: refs/heads/master
i:
  298635: 8bae429
v: v3
  • Loading branch information
Jeff Layton authored and Steve French committed Mar 31, 2012
1 parent 75a9285 commit f8d97a2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b5efb978469d152c2c7c0a09746fb0bfc6171868
refs/heads/master: b2a3ad9ca502169fc4c11296fa20f56059c7c031
24 changes: 12 additions & 12 deletions trunk/fs/cifs/cifssmb.c
Original file line number Diff line number Diff line change
Expand Up @@ -3892,13 +3892,12 @@ CIFSSMBSetCIFSACL(const int xid, struct cifs_tcon *tcon, __u16 fid,
int rc = 0;
int bytes_returned = 0;
SET_SEC_DESC_REQ *pSMB = NULL;
NTRANSACT_RSP *pSMBr = NULL;
void *pSMBr;

setCifsAclRetry:
rc = smb_init(SMB_COM_NT_TRANSACT, 19, tcon, (void **) &pSMB,
(void **) &pSMBr);
rc = smb_init(SMB_COM_NT_TRANSACT, 19, tcon, (void **) &pSMB, &pSMBr);
if (rc)
return (rc);
return rc;

pSMB->MaxSetupCount = 0;
pSMB->Reserved = 0;
Expand Down Expand Up @@ -3926,9 +3925,8 @@ CIFSSMBSetCIFSACL(const int xid, struct cifs_tcon *tcon, __u16 fid,
pSMB->AclFlags = cpu_to_le32(aclflag);

if (pntsd && acllen) {
memcpy((char *) &pSMBr->hdr.Protocol + data_offset,
(char *) pntsd,
acllen);
memcpy((char *)pSMBr + offsetof(struct smb_hdr, Protocol) +
data_offset, pntsd, acllen);
inc_rfc1001_len(pSMB, byte_count + data_count);
} else
inc_rfc1001_len(pSMB, byte_count);
Expand Down Expand Up @@ -5708,7 +5706,8 @@ CIFSSMBSetFileInfo(const int xid, struct cifs_tcon *tcon,
param_offset = offsetof(struct smb_com_transaction2_sfi_req, Fid) - 4;
offset = param_offset + params;

data_offset = (char *) (&pSMB->hdr.Protocol) + offset;
data_offset = (char *)pSMB +
offsetof(struct smb_hdr, Protocol) + offset;

count = sizeof(FILE_BASIC_INFO);
pSMB->MaxParameterCount = cpu_to_le16(2);
Expand Down Expand Up @@ -5977,7 +5976,7 @@ CIFSSMBUnixSetFileInfo(const int xid, struct cifs_tcon *tcon,
u16 fid, u32 pid_of_opener)
{
struct smb_com_transaction2_sfi_req *pSMB = NULL;
FILE_UNIX_BASIC_INFO *data_offset;
char *data_offset;
int rc = 0;
u16 params, param_offset, offset, byte_count, count;

Expand All @@ -5999,8 +5998,9 @@ CIFSSMBUnixSetFileInfo(const int xid, struct cifs_tcon *tcon,
param_offset = offsetof(struct smb_com_transaction2_sfi_req, Fid) - 4;
offset = param_offset + params;

data_offset = (FILE_UNIX_BASIC_INFO *)
((char *)(&pSMB->hdr.Protocol) + offset);
data_offset = (char *)pSMB +
offsetof(struct smb_hdr, Protocol) + offset;

count = sizeof(FILE_UNIX_BASIC_INFO);

pSMB->MaxParameterCount = cpu_to_le16(2);
Expand All @@ -6022,7 +6022,7 @@ CIFSSMBUnixSetFileInfo(const int xid, struct cifs_tcon *tcon,
inc_rfc1001_len(pSMB, byte_count);
pSMB->ByteCount = cpu_to_le16(byte_count);

cifs_fill_unix_set_info(data_offset, args);
cifs_fill_unix_set_info((FILE_UNIX_BASIC_INFO *)data_offset, args);

rc = SendReceiveNoRsp(xid, tcon->ses, (char *) pSMB, 0);
if (rc)
Expand Down

0 comments on commit f8d97a2

Please sign in to comment.