aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext2
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-08-01 19:48:31 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-08-01 19:48:31 -0400
commit1b8e94993c4752d98c33903aa836acc15f7e6d5c (patch)
treeb78cba208f0a193ce6ceebbc146021af4425b4e1 /fs/ext2
parent12ff47e7f5fb64c566f62e6cf6a3b291c51bd337 (diff)
parent206d440f64030b6425841bf7cb38e26a5ea0c382 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: xfs: Fix build breakage in xfs_iops.c when CONFIG_FS_POSIX_ACL is not set VFS: Reorganise shrink_dcache_for_umount_subtree() after demise of dcache_lock VFS: Remove dentry->d_lock locking from shrink_dcache_for_umount_subtree() VFS: Remove detached-dentry counter from shrink_dcache_for_umount_subtree() switch posix_acl_chmod() to umode_t switch posix_acl_from_mode() to umode_t switch posix_acl_equiv_mode() to umode_t * switch posix_acl_create() to umode_t * block: initialise bd_super in bdget() vfs: avoid call to inode_lru_list_del() if possible vfs: avoid taking inode_hash_lock on pipes and sockets vfs: conditionally call inode_wb_list_del() VFS: Fix automount for negative autofs dentries Btrfs: load the key from the dir item in readdir into a fake dentry devtmpfs: missing initialialization in never-hit case hppfs: missing include
Diffstat (limited to 'fs/ext2')
-rw-r--r--fs/ext2/acl.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/ext2/acl.c b/fs/ext2/acl.c
index 52c053763942..35d6a3cfd9ff 100644
--- a/fs/ext2/acl.c
+++ b/fs/ext2/acl.c
@@ -194,12 +194,10 @@ ext2_set_acl(struct inode *inode, int type, struct posix_acl *acl)
194 case ACL_TYPE_ACCESS: 194 case ACL_TYPE_ACCESS:
195 name_index = EXT2_XATTR_INDEX_POSIX_ACL_ACCESS; 195 name_index = EXT2_XATTR_INDEX_POSIX_ACL_ACCESS;
196 if (acl) { 196 if (acl) {
197 mode_t mode = inode->i_mode; 197 error = posix_acl_equiv_mode(acl, &inode->i_mode);
198 error = posix_acl_equiv_mode(acl, &mode);
199 if (error < 0) 198 if (error < 0)
200 return error; 199 return error;
201 else { 200 else {
202 inode->i_mode = mode;
203 inode->i_ctime = CURRENT_TIME_SEC; 201 inode->i_ctime = CURRENT_TIME_SEC;
204 mark_inode_dirty(inode); 202 mark_inode_dirty(inode);
205 if (error == 0) 203 if (error == 0)
@@ -253,16 +251,14 @@ ext2_init_acl(struct inode *inode, struct inode *dir)
253 inode->i_mode &= ~current_umask(); 251 inode->i_mode &= ~current_umask();
254 } 252 }
255 if (test_opt(inode->i_sb, POSIX_ACL) && acl) { 253 if (test_opt(inode->i_sb, POSIX_ACL) && acl) {
256 mode_t mode = inode->i_mode;
257 if (S_ISDIR(inode->i_mode)) { 254 if (S_ISDIR(inode->i_mode)) {
258 error = ext2_set_acl(inode, ACL_TYPE_DEFAULT, acl); 255 error = ext2_set_acl(inode, ACL_TYPE_DEFAULT, acl);
259 if (error) 256 if (error)
260 goto cleanup; 257 goto cleanup;
261 } 258 }
262 error = posix_acl_create(&acl, GFP_KERNEL, &mode); 259 error = posix_acl_create(&acl, GFP_KERNEL, &inode->i_mode);
263 if (error < 0) 260 if (error < 0)
264 return error; 261 return error;
265 inode->i_mode = mode;
266 if (error > 0) { 262 if (error > 0) {
267 /* This is an extended ACL */ 263 /* This is an extended ACL */
268 error = ext2_set_acl(inode, ACL_TYPE_ACCESS, acl); 264 error = ext2_set_acl(inode, ACL_TYPE_ACCESS, acl);