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>
This commit is contained in:
@@ -222,19 +222,16 @@ int btrfs_init_acl(struct btrfs_trans_handle *trans,
|
||||
}
|
||||
|
||||
if (IS_POSIXACL(dir) && acl) {
|
||||
mode_t mode = inode->i_mode;
|
||||
|
||||
if (S_ISDIR(inode->i_mode)) {
|
||||
ret = btrfs_set_acl(trans, inode, acl,
|
||||
ACL_TYPE_DEFAULT);
|
||||
if (ret)
|
||||
goto failed;
|
||||
}
|
||||
ret = posix_acl_create(&acl, GFP_NOFS, &mode);
|
||||
ret = posix_acl_create(&acl, GFP_NOFS, &inode->i_mode);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
inode->i_mode = mode;
|
||||
if (ret > 0) {
|
||||
/* we need an acl */
|
||||
ret = btrfs_set_acl(trans, inode, acl, ACL_TYPE_ACCESS);
|
||||
|
Reference in New Issue
Block a user