Commit d668e848 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
Loading
Loading
Loading
Loading
+10 −9
Original line number Diff line number Diff line
@@ -122,6 +122,8 @@ int orangefs_set_acl(struct inode *inode, struct posix_acl *acl, int type)
	struct iattr iattr;
	int rc;

	memset(&iattr, 0, sizeof iattr);

	if (type == ACL_TYPE_ACCESS && acl) {
		/*
		 * 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)
			return error;
		}

		if (acl) {
			rc = __orangefs_set_acl(inode, acl, type);
		} else {
		if (inode->i_mode != iattr.ia_mode)
			iattr.ia_valid = ATTR_MODE;
			rc = __orangefs_setattr(inode, &iattr);

	}

		return rc;
	rc = __orangefs_set_acl(inode, acl, type);

	} else {
		return -EINVAL;
	}
	if (!rc && (iattr.ia_valid == ATTR_MODE))
		rc = __orangefs_setattr(inode, &iattr);

	return rc;
}

int orangefs_init_acl(struct inode *inode, struct inode *dir)
+0 −1
Original line number Diff line number Diff line
@@ -149,7 +149,6 @@ static int __init orangefs_init(void)
		pr_info("%s: module version %s loaded\n",
			__func__,
			ORANGEFS_VERSION);
		ret = 0;
		goto out;
	}