diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-01 19:48:31 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-01 19:48:31 -0400 |
commit | 1b8e94993c4752d98c33903aa836acc15f7e6d5c (patch) | |
tree | b78cba208f0a193ce6ceebbc146021af4425b4e1 /fs/jfs | |
parent | 12ff47e7f5fb64c566f62e6cf6a3b291c51bd337 (diff) | |
parent | 206d440f64030b6425841bf7cb38e26a5ea0c382 (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/jfs')
-rw-r--r-- | fs/jfs/acl.c | 4 | ||||
-rw-r--r-- | fs/jfs/xattr.c | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/fs/jfs/acl.c b/fs/jfs/acl.c index b3a32caf2b45..45559dc3ea2f 100644 --- a/fs/jfs/acl.c +++ b/fs/jfs/acl.c | |||
@@ -127,16 +127,14 @@ int jfs_init_acl(tid_t tid, struct inode *inode, struct inode *dir) | |||
127 | return PTR_ERR(acl); | 127 | return PTR_ERR(acl); |
128 | 128 | ||
129 | if (acl) { | 129 | if (acl) { |
130 | mode_t mode = inode->i_mode; | ||
131 | if (S_ISDIR(inode->i_mode)) { | 130 | if (S_ISDIR(inode->i_mode)) { |
132 | rc = jfs_set_acl(tid, inode, ACL_TYPE_DEFAULT, acl); | 131 | rc = jfs_set_acl(tid, inode, ACL_TYPE_DEFAULT, acl); |
133 | if (rc) | 132 | if (rc) |
134 | goto cleanup; | 133 | goto cleanup; |
135 | } | 134 | } |
136 | rc = posix_acl_create(&acl, GFP_KERNEL, &mode); | 135 | rc = posix_acl_create(&acl, GFP_KERNEL, &inode->i_mode); |
137 | if (rc < 0) | 136 | if (rc < 0) |
138 | goto cleanup; /* posix_acl_release(NULL) is no-op */ | 137 | goto cleanup; /* posix_acl_release(NULL) is no-op */ |
139 | inode->i_mode = mode; | ||
140 | if (rc > 0) | 138 | if (rc > 0) |
141 | rc = jfs_set_acl(tid, inode, ACL_TYPE_ACCESS, acl); | 139 | rc = jfs_set_acl(tid, inode, ACL_TYPE_ACCESS, acl); |
142 | cleanup: | 140 | cleanup: |
diff --git a/fs/jfs/xattr.c b/fs/jfs/xattr.c index 24838f1eeee5..e87fedef23db 100644 --- a/fs/jfs/xattr.c +++ b/fs/jfs/xattr.c | |||
@@ -693,8 +693,7 @@ static int can_set_system_xattr(struct inode *inode, const char *name, | |||
693 | return rc; | 693 | return rc; |
694 | } | 694 | } |
695 | if (acl) { | 695 | if (acl) { |
696 | mode_t mode = inode->i_mode; | 696 | rc = posix_acl_equiv_mode(acl, &inode->i_mode); |
697 | rc = posix_acl_equiv_mode(acl, &mode); | ||
698 | posix_acl_release(acl); | 697 | posix_acl_release(acl); |
699 | if (rc < 0) { | 698 | if (rc < 0) { |
700 | printk(KERN_ERR | 699 | printk(KERN_ERR |
@@ -702,7 +701,6 @@ static int can_set_system_xattr(struct inode *inode, const char *name, | |||
702 | rc); | 701 | rc); |
703 | return rc; | 702 | return rc; |
704 | } | 703 | } |
705 | inode->i_mode = mode; | ||
706 | mark_inode_dirty(inode); | 704 | mark_inode_dirty(inode); |
707 | } | 705 | } |
708 | /* | 706 | /* |