diff options
Diffstat (limited to 'fs/jfs')
-rw-r--r-- | fs/jfs/acl.c | 4 |
1 files changed, 1 insertions, 3 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: |