Lines Matching defs:inode
30 static struct posix_acl *jfs_get_acl(struct inode *inode, int type)
37 acl = get_cached_acl(inode, type);
52 size = __jfs_getxattr(inode, ea_name, NULL, 0);
58 size = __jfs_getxattr(inode, ea_name, value, size);
71 set_cached_acl(inode, type, acl);
75 static int jfs_set_acl(tid_t tid, struct inode *inode, int type,
83 if (S_ISLNK(inode->i_mode))
92 if (!S_ISDIR(inode->i_mode))
107 rc = __jfs_setxattr(tid, inode, ea_name, value, size, 0);
112 set_cached_acl(inode, type, acl);
117 int jfs_check_acl(struct inode *inode, int mask)
119 struct posix_acl *acl = jfs_get_acl(inode, ACL_TYPE_ACCESS);
124 int error = posix_acl_permission(inode, acl, mask);
132 int jfs_init_acl(tid_t tid, struct inode *inode, struct inode *dir)
139 if (S_ISLNK(inode->i_mode))
147 if (S_ISDIR(inode->i_mode)) {
148 rc = jfs_set_acl(tid, inode, ACL_TYPE_DEFAULT, acl);
157 mode = inode->i_mode;
160 inode->i_mode = mode;
162 rc = jfs_set_acl(tid, inode, ACL_TYPE_ACCESS,
169 inode->i_mode &= ~current_umask();
171 JFS_IP(inode)->mode2 = (JFS_IP(inode)->mode2 & 0xffff0000) |
172 inode->i_mode;
177 int jfs_acl_chmod(struct inode *inode)
182 if (S_ISLNK(inode->i_mode))
185 acl = jfs_get_acl(inode, ACL_TYPE_ACCESS);
194 rc = posix_acl_chmod_masq(clone, inode->i_mode);
196 tid_t tid = txBegin(inode->i_sb, 0);
197 mutex_lock(&JFS_IP(inode)->commit_mutex);
198 rc = jfs_set_acl(tid, inode, ACL_TYPE_ACCESS, clone);
200 rc = txCommit(tid, 1, &inode, 0);
202 mutex_unlock(&JFS_IP(inode)->commit_mutex);