Merge branch 'master' into for-next
Fast-forward merge with Linus to be able to merge patches based on more recent version of the tree.
This commit is contained in:
@@ -272,12 +272,10 @@ reiserfs_set_acl(struct reiserfs_transaction_handle *th, struct inode *inode,
|
||||
case ACL_TYPE_ACCESS:
|
||||
name = POSIX_ACL_XATTR_ACCESS;
|
||||
if (acl) {
|
||||
mode_t mode = inode->i_mode;
|
||||
error = posix_acl_equiv_mode(acl, &mode);
|
||||
error = posix_acl_equiv_mode(acl, &inode->i_mode);
|
||||
if (error < 0)
|
||||
return error;
|
||||
else {
|
||||
inode->i_mode = mode;
|
||||
if (error == 0)
|
||||
acl = NULL;
|
||||
}
|
||||
@@ -354,8 +352,6 @@ reiserfs_inherit_default_acl(struct reiserfs_transaction_handle *th,
|
||||
return PTR_ERR(acl);
|
||||
|
||||
if (acl) {
|
||||
mode_t mode = inode->i_mode;
|
||||
|
||||
/* Copy the default ACL to the default ACL of a new directory */
|
||||
if (S_ISDIR(inode->i_mode)) {
|
||||
err = reiserfs_set_acl(th, inode, ACL_TYPE_DEFAULT,
|
||||
@@ -366,12 +362,10 @@ reiserfs_inherit_default_acl(struct reiserfs_transaction_handle *th,
|
||||
|
||||
/* Now we reconcile the new ACL and the mode,
|
||||
potentially modifying both */
|
||||
err = posix_acl_create(&acl, GFP_NOFS, &mode);
|
||||
err = posix_acl_create(&acl, GFP_NOFS, &inode->i_mode);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
inode->i_mode = mode;
|
||||
|
||||
/* If we need an ACL.. */
|
||||
if (err > 0)
|
||||
err = reiserfs_set_acl(th, inode, ACL_TYPE_ACCESS, acl);
|
||||
|
Reference in New Issue
Block a user