]> granicus.if.org Git - zfs/commitdiff
Drop redundant POSIX ACL check in zpl_init_acl()
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Mon, 15 Jul 2019 23:26:52 +0000 (08:26 +0900)
committerTony Hutter <hutter2@llnl.gov>
Wed, 25 Sep 2019 18:27:49 +0000 (11:27 -0700)
ZFS_ACLTYPE_POSIXACL has already been tested in zpl_init_acl(),
so no need to test again on POSIX ACL access.

Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
Closes #9009

module/zfs/zpl_xattr.c

index 8ee6e9a97f0a4c6c171a2536e457b428a0255151..95523f28e3b4130e30f8f8ae86a9468f6d49997e 100644 (file)
@@ -1130,12 +1130,9 @@ zpl_init_acl(struct inode *ip, struct inode *dir)
                return (0);
 
        if (!S_ISLNK(ip->i_mode)) {
-               if (ITOZSB(ip)->z_acl_type == ZFS_ACLTYPE_POSIXACL) {
-                       acl = zpl_get_acl(dir, ACL_TYPE_DEFAULT);
-                       if (IS_ERR(acl))
-                               return (PTR_ERR(acl));
-               }
-
+               acl = zpl_get_acl(dir, ACL_TYPE_DEFAULT);
+               if (IS_ERR(acl))
+                       return (PTR_ERR(acl));
                if (!acl) {
                        ip->i_mode &= ~current_umask();
                        ip->i_ctime = current_time(ip);
@@ -1144,7 +1141,7 @@ zpl_init_acl(struct inode *ip, struct inode *dir)
                }
        }
 
-       if ((ITOZSB(ip)->z_acl_type == ZFS_ACLTYPE_POSIXACL) && acl) {
+       if (acl) {
                umode_t mode;
 
                if (S_ISDIR(ip->i_mode)) {