Whamcloud - gitweb
LU-14651 llite: extend inode methods with user namespace arg
[fs/lustre-release.git] / lustre / llite / acl.c
index 515ac72..fb12ce2 100644 (file)
@@ -44,16 +44,17 @@ struct posix_acl *ll_get_acl(struct inode *inode, int type)
        struct posix_acl *acl = NULL;
        ENTRY;
 
-       spin_lock(&lli->lli_lock);
+       read_lock(&lli->lli_lock);
        /* VFS' acl_permission_check->check_acl will release the refcount */
        acl = posix_acl_dup(lli->lli_posix_acl);
-       spin_unlock(&lli->lli_lock);
+       read_unlock(&lli->lli_lock);
 
        RETURN(acl);
 }
 
 #ifdef HAVE_IOP_SET_ACL
-int ll_set_acl(struct inode *inode, struct posix_acl *acl, int type)
+int ll_set_acl(struct user_namespace *mnt_userns, struct inode *inode,
+              struct posix_acl *acl, int type)
 {
        struct ll_sb_info *sbi = ll_i2sbi(inode);
        struct ptlrpc_request *req = NULL;
@@ -67,7 +68,8 @@ int ll_set_acl(struct inode *inode, struct posix_acl *acl, int type)
        case ACL_TYPE_ACCESS:
                name = XATTR_NAME_POSIX_ACL_ACCESS;
                if (acl)
-                       rc = posix_acl_update_mode(inode, &inode->i_mode, &acl);
+                       rc = posix_acl_update_mode(mnt_userns, inode,
+                                                  &inode->i_mode, &acl);
                break;
 
        case ACL_TYPE_DEFAULT: