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

switch posix_acl_equiv_mode() to umode_t *

... so that &inode->i_mode could be passed to it

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro d6952123 d3fb6120

+15 -32
+1 -1
fs/9p/acl.c
··· 319 319 case ACL_TYPE_ACCESS: 320 320 name = POSIX_ACL_XATTR_ACCESS; 321 321 if (acl) { 322 - mode_t mode = inode->i_mode; 322 + umode_t mode = inode->i_mode; 323 323 retval = posix_acl_equiv_mode(acl, &mode); 324 324 if (retval < 0) 325 325 goto err_out;
+1 -4
fs/btrfs/acl.c
··· 111 111 int ret, size = 0; 112 112 const char *name; 113 113 char *value = NULL; 114 - mode_t mode; 115 114 116 115 if (acl) { 117 116 ret = posix_acl_valid(acl); ··· 121 122 122 123 switch (type) { 123 124 case ACL_TYPE_ACCESS: 124 - mode = inode->i_mode; 125 125 name = POSIX_ACL_XATTR_ACCESS; 126 126 if (acl) { 127 - ret = posix_acl_equiv_mode(acl, &mode); 127 + ret = posix_acl_equiv_mode(acl, &inode->i_mode); 128 128 if (ret < 0) 129 129 return ret; 130 - inode->i_mode = mode; 131 130 } 132 131 ret = 0; 133 132 break;
+1 -3
fs/ext2/acl.c
··· 194 194 case ACL_TYPE_ACCESS: 195 195 name_index = EXT2_XATTR_INDEX_POSIX_ACL_ACCESS; 196 196 if (acl) { 197 - mode_t mode = inode->i_mode; 198 - error = posix_acl_equiv_mode(acl, &mode); 197 + error = posix_acl_equiv_mode(acl, &inode->i_mode); 199 198 if (error < 0) 200 199 return error; 201 200 else { 202 - inode->i_mode = mode; 203 201 inode->i_ctime = CURRENT_TIME_SEC; 204 202 mark_inode_dirty(inode); 205 203 if (error == 0)
+1 -3
fs/ext3/acl.c
··· 199 199 case ACL_TYPE_ACCESS: 200 200 name_index = EXT3_XATTR_INDEX_POSIX_ACL_ACCESS; 201 201 if (acl) { 202 - mode_t mode = inode->i_mode; 203 - error = posix_acl_equiv_mode(acl, &mode); 202 + error = posix_acl_equiv_mode(acl, &inode->i_mode); 204 203 if (error < 0) 205 204 return error; 206 205 else { 207 - inode->i_mode = mode; 208 206 inode->i_ctime = CURRENT_TIME_SEC; 209 207 ext3_mark_inode_dirty(handle, inode); 210 208 if (error == 0)
+1 -3
fs/ext4/acl.c
··· 198 198 case ACL_TYPE_ACCESS: 199 199 name_index = EXT4_XATTR_INDEX_POSIX_ACL_ACCESS; 200 200 if (acl) { 201 - mode_t mode = inode->i_mode; 202 - error = posix_acl_equiv_mode(acl, &mode); 201 + error = posix_acl_equiv_mode(acl, &inode->i_mode); 203 202 if (error < 0) 204 203 return error; 205 204 else { 206 - inode->i_mode = mode; 207 205 inode->i_ctime = ext4_current_time(inode); 208 206 ext4_mark_inode_dirty(handle, inode); 209 207 if (error == 0)
+1 -5
fs/generic_acl.c
··· 82 82 return PTR_ERR(acl); 83 83 } 84 84 if (acl) { 85 - mode_t mode; 86 - 87 85 error = posix_acl_valid(acl); 88 86 if (error) 89 87 goto failed; 90 88 switch (type) { 91 89 case ACL_TYPE_ACCESS: 92 - mode = inode->i_mode; 93 - error = posix_acl_equiv_mode(acl, &mode); 90 + error = posix_acl_equiv_mode(acl, &inode->i_mode); 94 91 if (error < 0) 95 92 goto failed; 96 - inode->i_mode = mode; 97 93 inode->i_ctime = CURRENT_TIME; 98 94 if (error == 0) { 99 95 posix_acl_release(acl);
+1 -1
fs/gfs2/acl.c
··· 276 276 goto out_release; 277 277 278 278 if (type == ACL_TYPE_ACCESS) { 279 - mode_t mode = inode->i_mode; 279 + umode_t mode = inode->i_mode; 280 280 error = posix_acl_equiv_mode(acl, &mode); 281 281 282 282 if (error <= 0) {
+1 -1
fs/jffs2/acl.c
··· 227 227 case ACL_TYPE_ACCESS: 228 228 xprefix = JFFS2_XPREFIX_ACL_ACCESS; 229 229 if (acl) { 230 - mode_t mode = inode->i_mode; 230 + umode_t mode = inode->i_mode; 231 231 rc = posix_acl_equiv_mode(acl, &mode); 232 232 if (rc < 0) 233 233 return rc;
+1 -3
fs/jfs/xattr.c
··· 693 693 return rc; 694 694 } 695 695 if (acl) { 696 - mode_t mode = inode->i_mode; 697 - rc = posix_acl_equiv_mode(acl, &mode); 696 + rc = posix_acl_equiv_mode(acl, &inode->i_mode); 698 697 posix_acl_release(acl); 699 698 if (rc < 0) { 700 699 printk(KERN_ERR ··· 701 702 rc); 702 703 return rc; 703 704 } 704 - inode->i_mode = mode; 705 705 mark_inode_dirty(inode); 706 706 } 707 707 /*
+1 -1
fs/ocfs2/acl.c
··· 247 247 case ACL_TYPE_ACCESS: 248 248 name_index = OCFS2_XATTR_INDEX_POSIX_ACL_ACCESS; 249 249 if (acl) { 250 - mode_t mode = inode->i_mode; 250 + umode_t mode = inode->i_mode; 251 251 ret = posix_acl_equiv_mode(acl, &mode); 252 252 if (ret < 0) 253 253 return ret;
+2 -2
fs/posix_acl.c
··· 149 149 * file mode permission bits, or else 1. Returns -E... on error. 150 150 */ 151 151 int 152 - posix_acl_equiv_mode(const struct posix_acl *acl, mode_t *mode_p) 152 + posix_acl_equiv_mode(const struct posix_acl *acl, umode_t *mode_p) 153 153 { 154 154 const struct posix_acl_entry *pa, *pe; 155 - mode_t mode = 0; 155 + umode_t mode = 0; 156 156 int not_equiv = 0; 157 157 158 158 FOREACH_ACL_ENTRY(pa, acl, pe) {
+1 -3
fs/reiserfs/xattr_acl.c
··· 272 272 case ACL_TYPE_ACCESS: 273 273 name = POSIX_ACL_XATTR_ACCESS; 274 274 if (acl) { 275 - mode_t mode = inode->i_mode; 276 - error = posix_acl_equiv_mode(acl, &mode); 275 + error = posix_acl_equiv_mode(acl, &inode->i_mode); 277 276 if (error < 0) 278 277 return error; 279 278 else { 280 - inode->i_mode = mode; 281 279 if (error == 0) 282 280 acl = NULL; 283 281 }
+1 -1
fs/xfs/linux-2.6/xfs_acl.c
··· 381 381 goto out_release; 382 382 383 383 if (type == ACL_TYPE_ACCESS) { 384 - mode_t mode = inode->i_mode; 384 + umode_t mode = inode->i_mode; 385 385 error = posix_acl_equiv_mode(acl, &mode); 386 386 387 387 if (error <= 0) {
+1 -1
include/linux/posix_acl.h
··· 76 76 extern int posix_acl_valid(const struct posix_acl *); 77 77 extern int posix_acl_permission(struct inode *, const struct posix_acl *, int); 78 78 extern struct posix_acl *posix_acl_from_mode(mode_t, gfp_t); 79 - extern int posix_acl_equiv_mode(const struct posix_acl *, mode_t *); 79 + extern int posix_acl_equiv_mode(const struct posix_acl *, umode_t *); 80 80 extern int posix_acl_create(struct posix_acl **, gfp_t, umode_t *); 81 81 extern int posix_acl_chmod(struct posix_acl **, gfp_t, mode_t); 82 82