Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branches 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/{vfs-2.6,audit-current}

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
another race fix in jfs_check_acl()
Get "no acls for this inode" right, fix shmem breakage
inline functions left without protection of ifdef (acl)

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current:
audit: inode watches depend on CONFIG_AUDIT not CONFIG_AUDIT_SYSCALL

+23 -18
+2 -4
fs/btrfs/inode.c
··· 2122 2122 * any xattrs or acls 2123 2123 */ 2124 2124 maybe_acls = acls_after_inode_item(leaf, path->slots[0], inode->i_ino); 2125 - if (!maybe_acls) { 2126 - inode->i_acl = NULL; 2127 - inode->i_default_acl = NULL; 2128 - } 2125 + if (!maybe_acls) 2126 + cache_no_acl(inode); 2129 2127 2130 2128 BTRFS_I(inode)->block_group = btrfs_find_block_group(root, 0, 2131 2129 alloc_group_block, 0);
+1 -2
fs/jffs2/acl.c
··· 284 284 struct posix_acl *acl, *clone; 285 285 int rc; 286 286 287 - inode->i_default_acl = NULL; 288 - inode->i_acl = NULL; 287 + cache_no_acl(inode); 289 288 290 289 if (S_ISLNK(*i_mode)) 291 290 return 0; /* Symlink always has no-ACL */
+7 -6
fs/jfs/acl.c
··· 118 118 119 119 static int jfs_check_acl(struct inode *inode, int mask) 120 120 { 121 - if (inode->i_acl == ACL_NOT_CACHED) { 122 - struct posix_acl *acl = jfs_get_acl(inode, ACL_TYPE_ACCESS); 123 - if (IS_ERR(acl)) 124 - return PTR_ERR(acl); 121 + struct posix_acl *acl = jfs_get_acl(inode, ACL_TYPE_ACCESS); 122 + 123 + if (IS_ERR(acl)) 124 + return PTR_ERR(acl); 125 + if (acl) { 126 + int error = posix_acl_permission(inode, acl, mask); 125 127 posix_acl_release(acl); 128 + return error; 126 129 } 127 130 128 - if (inode->i_acl) 129 - return posix_acl_permission(inode, inode->i_acl, mask); 130 131 return -EAGAIN; 131 132 } 132 133
+10
include/linux/posix_acl.h
··· 83 83 extern struct posix_acl *get_posix_acl(struct inode *, int); 84 84 extern int set_posix_acl(struct inode *, int, struct posix_acl *); 85 85 86 + #ifdef CONFIG_FS_POSIX_ACL 86 87 static inline struct posix_acl *get_cached_acl(struct inode *inode, int type) 87 88 { 88 89 struct posix_acl **p, *acl; ··· 146 145 spin_unlock(&inode->i_lock); 147 146 if (old != ACL_NOT_CACHED) 148 147 posix_acl_release(old); 148 + } 149 + #endif 150 + 151 + static inline void cache_no_acl(struct inode *inode) 152 + { 153 + #ifdef CONFIG_FS_POSIX_ACL 154 + inode->i_acl = NULL; 155 + inode->i_default_acl = NULL; 156 + #endif 149 157 } 150 158 151 159 #endif /* __LINUX_POSIX_ACL_H */
+2 -2
kernel/Makefile
··· 69 69 obj-$(CONFIG_RESOURCE_COUNTERS) += res_counter.o 70 70 obj-$(CONFIG_STOP_MACHINE) += stop_machine.o 71 71 obj-$(CONFIG_KPROBES_SANITY_TEST) += test_kprobes.o 72 - obj-$(CONFIG_AUDIT) += audit.o auditfilter.o 73 - obj-$(CONFIG_AUDITSYSCALL) += auditsc.o audit_watch.o 72 + obj-$(CONFIG_AUDIT) += audit.o auditfilter.o audit_watch.o 73 + obj-$(CONFIG_AUDITSYSCALL) += auditsc.o 74 74 obj-$(CONFIG_GCOV_KERNEL) += gcov/ 75 75 obj-$(CONFIG_AUDIT_TREE) += audit_tree.o 76 76 obj-$(CONFIG_KPROBES) += kprobes.o
+1 -4
mm/shmem.c
··· 1558 1558 spin_lock_init(&info->lock); 1559 1559 info->flags = flags & VM_NORESERVE; 1560 1560 INIT_LIST_HEAD(&info->swaplist); 1561 + cache_no_acl(inode); 1561 1562 1562 1563 switch (mode & S_IFMT) { 1563 1564 default: ··· 2380 2379 p = (struct shmem_inode_info *)kmem_cache_alloc(shmem_inode_cachep, GFP_KERNEL); 2381 2380 if (!p) 2382 2381 return NULL; 2383 - #ifdef CONFIG_TMPFS_POSIX_ACL 2384 - p->vfs_inode.i_acl = NULL; 2385 - p->vfs_inode.i_default_acl = NULL; 2386 - #endif 2387 2382 return &p->vfs_inode; 2388 2383 } 2389 2384