Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154297
b: refs/heads/master
c: 72c0490
h: refs/heads/master
i:
  154295: 03458d9
v: v3
  • Loading branch information
Al Viro committed Jun 24, 2009
1 parent cb80df8 commit 3a63168
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 641cf4a668e9e69d2bc061e953422ff72a91f86e
refs/heads/master: 72c04902d1e27c8a324014cff1d4475c11b1cecd
6 changes: 2 additions & 4 deletions trunk/fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -2122,10 +2122,8 @@ static void btrfs_read_locked_inode(struct inode *inode)
* any xattrs or acls
*/
maybe_acls = acls_after_inode_item(leaf, path->slots[0], inode->i_ino);
if (!maybe_acls) {
inode->i_acl = NULL;
inode->i_default_acl = NULL;
}
if (!maybe_acls)
cache_no_acl(inode);

BTRFS_I(inode)->block_group = btrfs_find_block_group(root, 0,
alloc_group_block, 0);
Expand Down
3 changes: 1 addition & 2 deletions trunk/fs/jffs2/acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,7 @@ int jffs2_init_acl_pre(struct inode *dir_i, struct inode *inode, int *i_mode)
struct posix_acl *acl, *clone;
int rc;

inode->i_default_acl = NULL;
inode->i_acl = NULL;
cache_no_acl(inode);

if (S_ISLNK(*i_mode))
return 0; /* Symlink always has no-ACL */
Expand Down
9 changes: 9 additions & 0 deletions trunk/include/linux/posix_acl.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,13 @@ static inline void forget_cached_acl(struct inode *inode, int type)
posix_acl_release(old);
}
#endif

static inline void cache_no_acl(struct inode *inode)
{
#ifdef CONFIG_FS_POSIX_ACL
inode->i_acl = NULL;
inode->i_default_acl = NULL;
#endif
}

#endif /* __LINUX_POSIX_ACL_H */
5 changes: 1 addition & 4 deletions trunk/mm/shmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -1558,6 +1558,7 @@ static struct inode *shmem_get_inode(struct super_block *sb, int mode,
spin_lock_init(&info->lock);
info->flags = flags & VM_NORESERVE;
INIT_LIST_HEAD(&info->swaplist);
cache_no_acl(inode);

switch (mode & S_IFMT) {
default:
Expand Down Expand Up @@ -2379,10 +2380,6 @@ static struct inode *shmem_alloc_inode(struct super_block *sb)
p = (struct shmem_inode_info *)kmem_cache_alloc(shmem_inode_cachep, GFP_KERNEL);
if (!p)
return NULL;
#ifdef CONFIG_TMPFS_POSIX_ACL
p->vfs_inode.i_acl = NULL;
p->vfs_inode.i_default_acl = NULL;
#endif
return &p->vfs_inode;
}

Expand Down

0 comments on commit 3a63168

Please sign in to comment.