diff options
author | Steve French <stfrench@microsoft.com> | 2021-02-22 21:40:43 +0100 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2021-02-23 04:20:44 +0100 |
commit | 23bda5e6511083ec1d76377e8075388e02639147 (patch) | |
tree | b3749e04134a0a2134206a7cc33023c6385f453e /fs/cifs | |
parent | cifs: Change SIDs in ACEs while transferring file ownership. (diff) | |
download | linux-23bda5e6511083ec1d76377e8075388e02639147.tar.xz linux-23bda5e6511083ec1d76377e8075388e02639147.zip |
cifs: cleanup a few le16 vs. le32 uses in cifsacl.c
Cleanup some minor sparse warnings in cifsacl.c
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/cifsacl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c index d44bfa62c1cd..0806ae784061 100644 --- a/fs/cifs/cifsacl.c +++ b/fs/cifs/cifsacl.c @@ -1143,7 +1143,7 @@ static int set_chmod_dacl(struct cifs_acl *pdacl, struct cifs_acl *pndacl, num_aces++; next_ace: - size += le32_to_cpu(pntace->size); + size += le16_to_cpu(pntace->size); } /* If inherited ACEs are not present, place the new ones at the tail */ @@ -1291,7 +1291,7 @@ static int build_sec_desc(struct cifs_ntsd *pntsd, struct cifs_ntsd *pnntsd, ndacl_ptr->revision = dacloffset ? dacl_ptr->revision : cpu_to_le16(ACL_REVISION); - ndacl_ptr->size = cpu_to_le32(0); + ndacl_ptr->size = cpu_to_le16(0); ndacl_ptr->num_aces = cpu_to_le32(0); rc = set_chmod_dacl(dacl_ptr, ndacl_ptr, owner_sid_ptr, group_sid_ptr, @@ -1639,7 +1639,7 @@ id_mode_to_cifs_acl(struct inode *inode, const char *path, __u64 *pnmode, dacl_ptr = (struct cifs_acl *)((char *)pntsd + dacloffset); if (mode_from_sid) nsecdesclen += - le16_to_cpu(dacl_ptr->num_aces) * sizeof(struct cifs_ace); + le32_to_cpu(dacl_ptr->num_aces) * sizeof(struct cifs_ace); else /* cifsacl */ nsecdesclen += le16_to_cpu(dacl_ptr->size); } |