summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2022-10-28 12:50:50 +0200
committerChristian Brauner (Microsoft) <brauner@kernel.org>2022-10-28 12:50:50 +0200
commitf7adeea9ebdbf73454f083c21de57579e982f2a1 (patch)
tree9e5c016338c3a139c48b1f1f8a38a4190c415f7c
parent20eb0cf9a3c1bdde2f3e81365e844dec312da4fe (diff)
parentcb2144d66b0b24fd1b880fc72678ba21ca414dab (diff)
Merge branch 'fs.acl.rework' into for-next
-rw-r--r--fs/cifs/cifsacl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c
index 6a9f03c882dc..c647f0d56518 100644
--- a/fs/cifs/cifsacl.c
+++ b/fs/cifs/cifsacl.c
@@ -1764,6 +1764,10 @@ int cifs_set_acl(struct user_namespace *mnt_userns, struct dentry *dentry,
rc = PTR_ERR(full_path);
goto out;
}
+
+ if (!acl)
+ goto out;
+
/* return dos attributes as pseudo xattr */
/* return alt name if available as pseudo attr */
@@ -1778,8 +1782,6 @@ int cifs_set_acl(struct user_namespace *mnt_userns, struct dentry *dentry,
switch (type) {
case ACL_TYPE_ACCESS:
- if (!acl)
- goto out;
if (sb->s_flags & SB_POSIXACL)
rc = cifs_do_set_acl(xid, pTcon, full_path, acl,
ACL_TYPE_ACCESS,
@@ -1788,8 +1790,6 @@ int cifs_set_acl(struct user_namespace *mnt_userns, struct dentry *dentry,
break;
case ACL_TYPE_DEFAULT:
- if (!acl)
- goto out;
if (sb->s_flags & SB_POSIXACL)
rc = cifs_do_set_acl(xid, pTcon, full_path, acl,
ACL_TYPE_DEFAULT,