Lines Matching refs:inode
16 struct inode *inode, int type,
21 reiserfs_set_acl(struct inode *inode, struct posix_acl *acl, int type)
28 umode_t mode = inode->i_mode;
35 jcreate_blocks = reiserfs_xattr_jcreate_nblocks(inode) +
36 reiserfs_xattr_nblocks(inode, size) * 2;
38 reiserfs_write_lock(inode->i_sb);
39 error = journal_begin(&th, inode->i_sb, jcreate_blocks);
40 reiserfs_write_unlock(inode->i_sb);
43 error = posix_acl_update_mode(inode, &mode, &acl);
48 error = __reiserfs_set_acl(&th, inode, type, acl);
50 inode->i_mode = mode;
52 reiserfs_write_lock(inode->i_sb);
54 reiserfs_write_unlock(inode->i_sb);
188 * inode->i_mutex: down
191 struct posix_acl *reiserfs_get_acl(struct inode *inode, int type)
209 size = reiserfs_xattr_get(inode, name, NULL, 0);
220 retval = reiserfs_xattr_get(inode, name, value, size);
240 * inode->i_mutex: down
244 __reiserfs_set_acl(struct reiserfs_transaction_handle *th, struct inode *inode,
258 if (!S_ISDIR(inode->i_mode))
271 error = reiserfs_xattr_set_handle(th, inode, name, value, size, 0);
274 * Ensure that the inode gets dirtied if we're only using
276 * to check if the inode is hashed here since we won't get
282 inode->i_ctime = current_time(inode);
283 mark_inode_dirty(inode);
290 set_cached_acl(inode, type, acl);
297 * inode is new and not released into the wild yet
301 struct inode *dir, struct dentry *dentry,
302 struct inode *inode)
308 if (S_ISLNK(inode->i_mode))
323 if (IS_PRIVATE(inode))
326 err = posix_acl_create(dir, &inode->i_mode, &default_acl, &acl);
331 err = __reiserfs_set_acl(th, inode, ACL_TYPE_DEFAULT,
337 err = __reiserfs_set_acl(th, inode, ACL_TYPE_ACCESS,
346 inode->i_mode &= ~current_umask();
361 int reiserfs_cache_default_acl(struct inode *inode)
366 if (IS_PRIVATE(inode))
369 acl = get_acl(inode, ACL_TYPE_DEFAULT);
374 /* Other xattrs can be created during inode creation. We don't
378 nblocks = reiserfs_xattr_jcreate_nblocks(inode);
379 nblocks += JOURNAL_BLOCKS_PER_OBJECT(inode->i_sb);
381 REISERFS_I(inode)->i_flags |= i_has_xattr_dir;
384 nblocks += reiserfs_xattr_nblocks(inode, size) * 4;
394 int reiserfs_acl_chmod(struct inode *inode)
396 if (IS_PRIVATE(inode))
398 if (get_inode_sd_version(inode) == STAT_DATA_V1 ||
399 !reiserfs_posixacl(inode->i_sb))
402 return posix_acl_chmod(inode, inode->i_mode);