Skip to content

Commit

Permalink
xfs: fix wrong errno from xfs_initxattrs
Browse files Browse the repository at this point in the history
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Jie Liu <jeff.liu@oracle.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
  • Loading branch information
Dave Chinner authored and Dave Chinner committed May 14, 2014
1 parent 65149e3 commit a5a14de
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fs/xfs/xfs_iops.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ xfs_initxattrs(
int error = 0;

for (xattr = xattr_array; xattr->name != NULL; xattr++) {
error = xfs_attr_set(ip, xattr->name, xattr->value,
xattr->value_len, ATTR_SECURE);
error = -xfs_attr_set(ip, xattr->name, xattr->value,
xattr->value_len, ATTR_SECURE);
if (error < 0)
break;
}
Expand All @@ -93,8 +93,8 @@ xfs_init_security(
struct inode *dir,
const struct qstr *qstr)
{
return security_inode_init_security(inode, dir, qstr,
&xfs_initxattrs, NULL);
return -security_inode_init_security(inode, dir, qstr,
&xfs_initxattrs, NULL);
}

static void
Expand Down

0 comments on commit a5a14de

Please sign in to comment.