Commit 5beaf8df authored by Dave Kleikamp's avatar Dave Kleikamp

JFS: Fix broken return code checking in ACL code

parent 85119d33
......@@ -668,12 +668,13 @@ static int can_set_system_xattr(struct inode *inode, const char *name,
*/
if (strcmp(name, XATTR_NAME_ACL_ACCESS) == 0) {
acl = posix_acl_from_xattr(value, value_len);
if (acl < 0) {
if (IS_ERR(acl)) {
rc = PTR_ERR(acl);
printk(KERN_ERR "posix_acl_from_xattr returned %d\n",
rc);
return rc;
}
if (acl > 0) {
if (acl) {
mode_t mode = inode->i_mode;
rc = posix_acl_equiv_mode(acl, &mode);
posix_acl_release(acl);
......
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