aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/acl.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-07-23 18:37:50 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2011-08-01 02:09:42 -0400
commitd3fb612076eebec6f67257db0c7a9666ac7e5892 (patch)
tree5265fca258a74ffa75b845998492abb9446db72c /fs/btrfs/acl.c
parent782b94cdf577b4df1feb376f372dccc28e66a771 (diff)
switch posix_acl_create() to umode_t *
so we can pass &inode->i_mode to it Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/btrfs/acl.c')
-rw-r--r--fs/btrfs/acl.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c
index 65a735d8f6e4..59086142c14d 100644
--- a/fs/btrfs/acl.c
+++ b/fs/btrfs/acl.c
@@ -222,19 +222,16 @@ int btrfs_init_acl(struct btrfs_trans_handle *trans,
222 } 222 }
223 223
224 if (IS_POSIXACL(dir) && acl) { 224 if (IS_POSIXACL(dir) && acl) {
225 mode_t mode = inode->i_mode;
226
227 if (S_ISDIR(inode->i_mode)) { 225 if (S_ISDIR(inode->i_mode)) {
228 ret = btrfs_set_acl(trans, inode, acl, 226 ret = btrfs_set_acl(trans, inode, acl,
229 ACL_TYPE_DEFAULT); 227 ACL_TYPE_DEFAULT);
230 if (ret) 228 if (ret)
231 goto failed; 229 goto failed;
232 } 230 }
233 ret = posix_acl_create(&acl, GFP_NOFS, &mode); 231 ret = posix_acl_create(&acl, GFP_NOFS, &inode->i_mode);
234 if (ret < 0) 232 if (ret < 0)
235 return ret; 233 return ret;
236 234
237 inode->i_mode = mode;
238 if (ret > 0) { 235 if (ret > 0) {
239 /* we need an acl */ 236 /* we need an acl */
240 ret = btrfs_set_acl(trans, inode, acl, ACL_TYPE_ACCESS); 237 ret = btrfs_set_acl(trans, inode, acl, ACL_TYPE_ACCESS);