Skip to content

Commit d668e84

Browse files
committed
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...
2 parents 57d528b + e848643 commit d668e84

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

fs/orangefs/acl.c

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ int orangefs_set_acl(struct inode *inode, struct posix_acl *acl, int type)
122122
struct iattr iattr;
123123
int rc;
124124

125+
memset(&iattr, 0, sizeof iattr);
126+
125127
if (type == ACL_TYPE_ACCESS && acl) {
126128
/*
127129
* 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)
138140
return error;
139141
}
140142

141-
if (acl) {
142-
rc = __orangefs_set_acl(inode, acl, type);
143-
} else {
143+
if (inode->i_mode != iattr.ia_mode)
144144
iattr.ia_valid = ATTR_MODE;
145-
rc = __orangefs_setattr(inode, &iattr);
146-
}
147145

148-
return rc;
149-
150-
} else {
151-
return -EINVAL;
152146
}
147+
148+
rc = __orangefs_set_acl(inode, acl, type);
149+
150+
if (!rc && (iattr.ia_valid == ATTR_MODE))
151+
rc = __orangefs_setattr(inode, &iattr);
152+
153+
return rc;
153154
}
154155

155156
int orangefs_init_acl(struct inode *inode, struct inode *dir)

fs/orangefs/orangefs-mod.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ static int __init orangefs_init(void)
149149
pr_info("%s: module version %s loaded\n",
150150
__func__,
151151
ORANGEFS_VERSION);
152-
ret = 0;
153152
goto out;
154153
}
155154

0 commit comments

Comments
 (0)