Commit d668e848 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'for-linus-5.9-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux

Pull orangefs updates from Mike Marshall:
 "A fix and a cleanup...

  The fix: Al Viro pointed out that I had broken some acl functionality
  with one of my previous patches.

  And the cleanup: Jing Xiangfeng found and removed a needless variable
  assignment"

* tag 'for-linus-5.9-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux:
  orangefs: remove unnecessary assignment to variable ret
  orangefs: posix acl fix...
parents 57d528bf e848643b
...@@ -122,6 +122,8 @@ int orangefs_set_acl(struct inode *inode, struct posix_acl *acl, int type) ...@@ -122,6 +122,8 @@ int orangefs_set_acl(struct inode *inode, struct posix_acl *acl, int type)
struct iattr iattr; struct iattr iattr;
int rc; int rc;
memset(&iattr, 0, sizeof iattr);
if (type == ACL_TYPE_ACCESS && acl) { if (type == ACL_TYPE_ACCESS && acl) {
/* /*
* posix_acl_update_mode checks to see if the permissions * posix_acl_update_mode checks to see if the permissions
...@@ -138,18 +140,17 @@ int orangefs_set_acl(struct inode *inode, struct posix_acl *acl, int type) ...@@ -138,18 +140,17 @@ int orangefs_set_acl(struct inode *inode, struct posix_acl *acl, int type)
return error; return error;
} }
if (acl) { if (inode->i_mode != iattr.ia_mode)
rc = __orangefs_set_acl(inode, acl, type);
} else {
iattr.ia_valid = ATTR_MODE; iattr.ia_valid = ATTR_MODE;
rc = __orangefs_setattr(inode, &iattr);
}
return rc;
} else {
return -EINVAL;
} }
rc = __orangefs_set_acl(inode, acl, type);
if (!rc && (iattr.ia_valid == ATTR_MODE))
rc = __orangefs_setattr(inode, &iattr);
return rc;
} }
int orangefs_init_acl(struct inode *inode, struct inode *dir) int orangefs_init_acl(struct inode *inode, struct inode *dir)
......
...@@ -149,7 +149,6 @@ static int __init orangefs_init(void) ...@@ -149,7 +149,6 @@ static int __init orangefs_init(void)
pr_info("%s: module version %s loaded\n", pr_info("%s: module version %s loaded\n",
__func__, __func__,
ORANGEFS_VERSION); ORANGEFS_VERSION);
ret = 0;
goto out; goto out;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment