]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - fs/xfs/linux-2.6/xfs_iops.c
fs: take the ACL checks to common code
[mirror_ubuntu-zesty-kernel.git] / fs / xfs / linux-2.6 / xfs_iops.c
index 501e4f630548ad7a4ffd50f78fbc91faf55d0241..6544c3236bc8dd51bff1c8d9935d1f979830553c 100644 (file)
@@ -202,9 +202,9 @@ xfs_vn_mknod(
 
        if (default_acl) {
                error = -xfs_inherit_acl(inode, default_acl);
+               default_acl = NULL;
                if (unlikely(error))
                        goto out_cleanup_inode;
-               posix_acl_release(default_acl);
        }
 
 
@@ -1022,7 +1022,7 @@ xfs_vn_fiemap(
 }
 
 static const struct inode_operations xfs_inode_operations = {
-       .check_acl              = xfs_check_acl,
+       .get_acl                = xfs_get_acl,
        .getattr                = xfs_vn_getattr,
        .setattr                = xfs_vn_setattr,
        .setxattr               = generic_setxattr,
@@ -1048,7 +1048,7 @@ static const struct inode_operations xfs_dir_inode_operations = {
        .rmdir                  = xfs_vn_unlink,
        .mknod                  = xfs_vn_mknod,
        .rename                 = xfs_vn_rename,
-       .check_acl              = xfs_check_acl,
+       .get_acl                = xfs_get_acl,
        .getattr                = xfs_vn_getattr,
        .setattr                = xfs_vn_setattr,
        .setxattr               = generic_setxattr,
@@ -1073,7 +1073,7 @@ static const struct inode_operations xfs_dir_ci_inode_operations = {
        .rmdir                  = xfs_vn_unlink,
        .mknod                  = xfs_vn_mknod,
        .rename                 = xfs_vn_rename,
-       .check_acl              = xfs_check_acl,
+       .get_acl                = xfs_get_acl,
        .getattr                = xfs_vn_getattr,
        .setattr                = xfs_vn_setattr,
        .setxattr               = generic_setxattr,
@@ -1086,7 +1086,7 @@ static const struct inode_operations xfs_symlink_inode_operations = {
        .readlink               = generic_readlink,
        .follow_link            = xfs_vn_follow_link,
        .put_link               = xfs_vn_put_link,
-       .check_acl              = xfs_check_acl,
+       .get_acl                = xfs_get_acl,
        .getattr                = xfs_vn_getattr,
        .setattr                = xfs_vn_setattr,
        .setxattr               = generic_setxattr,
@@ -1194,6 +1194,10 @@ xfs_setup_inode(
                break;
        }
 
+       /* if there is no attribute fork no ACL can exist on this inode */
+       if (!XFS_IFORK_Q(ip))
+               cache_no_acl(inode);
+
        xfs_iflags_clear(ip, XFS_INEW);
        barrier();