Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154299
b: refs/heads/master
c: 3a6a6c1
h: refs/heads/master
i:
  154297: 3a63168
  154295: 03458d9
v: v3
  • Loading branch information
Eric Paris authored and Al Viro committed Jun 24, 2009
1 parent 7621816 commit efb1493
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 24 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: d5bb68adda7cc179e8efadeaa3a283cb470f13a6
refs/heads/master: 3a6a6c16be78472a52f6dd7d88913373b42ad0f7
6 changes: 4 additions & 2 deletions trunk/fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -2122,8 +2122,10 @@ 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)
cache_no_acl(inode);
if (!maybe_acls) {
inode->i_acl = NULL;
inode->i_default_acl = NULL;
}

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

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

if (S_ISLNK(*i_mode))
return 0; /* Symlink always has no-ACL */
Expand Down
13 changes: 6 additions & 7 deletions trunk/fs/jfs/acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,15 @@ static int jfs_set_acl(tid_t tid, struct inode *inode, int type,

static int jfs_check_acl(struct inode *inode, int mask)
{
struct posix_acl *acl = jfs_get_acl(inode, ACL_TYPE_ACCESS);

if (IS_ERR(acl))
return PTR_ERR(acl);
if (acl) {
int error = posix_acl_permission(inode, acl, mask);
if (inode->i_acl == ACL_NOT_CACHED) {
struct posix_acl *acl = jfs_get_acl(inode, ACL_TYPE_ACCESS);
if (IS_ERR(acl))
return PTR_ERR(acl);
posix_acl_release(acl);
return error;
}

if (inode->i_acl)
return posix_acl_permission(inode, inode->i_acl, mask);
return -EAGAIN;
}

Expand Down
10 changes: 0 additions & 10 deletions trunk/include/linux/posix_acl.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ extern int posix_acl_chmod_masq(struct posix_acl *, mode_t);
extern struct posix_acl *get_posix_acl(struct inode *, int);
extern int set_posix_acl(struct inode *, int, struct posix_acl *);

#ifdef CONFIG_FS_POSIX_ACL
static inline struct posix_acl *get_cached_acl(struct inode *inode, int type)
{
struct posix_acl **p, *acl;
Expand Down Expand Up @@ -147,14 +146,5 @@ static inline void forget_cached_acl(struct inode *inode, int type)
if (old != ACL_NOT_CACHED)
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 */
4 changes: 2 additions & 2 deletions trunk/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ obj-$(CONFIG_IKCONFIG) += configs.o
obj-$(CONFIG_RESOURCE_COUNTERS) += res_counter.o
obj-$(CONFIG_STOP_MACHINE) += stop_machine.o
obj-$(CONFIG_KPROBES_SANITY_TEST) += test_kprobes.o
obj-$(CONFIG_AUDIT) += audit.o auditfilter.o
obj-$(CONFIG_AUDITSYSCALL) += auditsc.o audit_watch.o
obj-$(CONFIG_AUDIT) += audit.o auditfilter.o audit_watch.o
obj-$(CONFIG_AUDITSYSCALL) += auditsc.o
obj-$(CONFIG_GCOV_KERNEL) += gcov/
obj-$(CONFIG_AUDIT_TREE) += audit_tree.o
obj-$(CONFIG_KPROBES) += kprobes.o
Expand Down
5 changes: 4 additions & 1 deletion trunk/mm/shmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -1558,7 +1558,6 @@ 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 @@ -2380,6 +2379,10 @@ 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 efb1493

Please sign in to comment.