Skip to content

Commit

Permalink
Address review
Browse files Browse the repository at this point in the history
  • Loading branch information
anodos325 committed Dec 21, 2023
1 parent 3cae485 commit be5d16e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fs/smb/client/cifs_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -1153,7 +1153,7 @@ static ssize_t cifs_zfsacl_flags_proc_write(struct file *file,

idmap_flags = flags & MODFLAG_ALL_IDMAP;

if ((flags & MODFLAG_ALL_IDMAP) == 0) {
if (idmap_flags == 0) {
cifs_dbg(VFS, "At least one idmap-related flag must be set");
return -EINVAL;
}
Expand Down
8 changes: 6 additions & 2 deletions fs/smb/client/cifsacl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2136,7 +2136,7 @@ convert_smb_sid_to_nfs_who(struct cifs_sid *psid, u32 *iflag, u32 *who_id, u32 *
cifs_dbg(FYI, "%s: subauthority count [%u] exceeds "
"maxiumum possible value.\n",
__func__, psid->num_subauth);
return -EIO;
return -EINVAL;
}

rc = convert_smb_sid_to_nfs_who_special(psid, iflag, who_id, flags);
Expand Down Expand Up @@ -2503,6 +2503,10 @@ int ntsd_to_zfsacl_xattr(struct cifs_ntsd *pntsd,
return -EIO;

dacloffset = le32_to_cpu(pntsd->dacloffset);
if (!dacloffset) {
return generate_null_zfsacl(buf_out);
}

dacl_ptr = (struct cifs_acl *)((char *)pntsd + dacloffset);
if (dacl_ptr == NULL) {
return generate_null_zfsacl(buf_out);
Expand Down Expand Up @@ -2797,7 +2801,7 @@ force_smb3_dacl_info(struct smb3_sd *sd, u32 acl_flag)
}

/*
* This is special handling for either NULL or emtpy ACLs.
* This is special handling for either NULL or empty ACLs.
* Returns 0 if ACL is generated, -EAGAIN if regular parsing
* required, and otherwise -errno.
*/
Expand Down

0 comments on commit be5d16e

Please sign in to comment.