]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
xfs: fix wrong errno from xfs_initxattrs
authorDave Chinner <dchinner@redhat.com>
Wed, 14 May 2014 23:22:21 +0000 (09:22 +1000)
committerDave Chinner <david@fromorbit.com>
Wed, 14 May 2014 23:22:21 +0000 (09:22 +1000)
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Jie Liu <jeff.liu@oracle.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_iops.c

index 301ecbfcc0bee48cff5a8cc419a17d67c7f56e74..adfb18e199926e28f9d0a25df22bcad79ae3b6be 100644 (file)
@@ -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;
        }
@@ -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