Skip to content

Commit f7adeea

Browse files
committed
Merge branch 'fs.acl.rework' into for-next
2 parents 20eb0cf + cb2144d commit f7adeea

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

fs/cifs/cifsacl.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1764,6 +1764,10 @@ int cifs_set_acl(struct user_namespace *mnt_userns, struct dentry *dentry,
17641764
rc = PTR_ERR(full_path);
17651765
goto out;
17661766
}
1767+
1768+
if (!acl)
1769+
goto out;
1770+
17671771
/* return dos attributes as pseudo xattr */
17681772
/* return alt name if available as pseudo attr */
17691773

@@ -1778,8 +1782,6 @@ int cifs_set_acl(struct user_namespace *mnt_userns, struct dentry *dentry,
17781782

17791783
switch (type) {
17801784
case ACL_TYPE_ACCESS:
1781-
if (!acl)
1782-
goto out;
17831785
if (sb->s_flags & SB_POSIXACL)
17841786
rc = cifs_do_set_acl(xid, pTcon, full_path, acl,
17851787
ACL_TYPE_ACCESS,
@@ -1788,8 +1790,6 @@ int cifs_set_acl(struct user_namespace *mnt_userns, struct dentry *dentry,
17881790
break;
17891791

17901792
case ACL_TYPE_DEFAULT:
1791-
if (!acl)
1792-
goto out;
17931793
if (sb->s_flags & SB_POSIXACL)
17941794
rc = cifs_do_set_acl(xid, pTcon, full_path, acl,
17951795
ACL_TYPE_DEFAULT,

0 commit comments

Comments
 (0)