]> git.karo-electronics.de Git - linux-beck.git/commitdiff
xfs: remove incorrect error negation in attr_multi ioctl
authorBrian Foster <bfoster@redhat.com>
Wed, 21 Jan 2015 23:04:24 +0000 (10:04 +1100)
committerDave Chinner <david@fromorbit.com>
Wed, 21 Jan 2015 23:04:24 +0000 (10:04 +1100)
xfs_compat_attrmulti_by_handle() calls memdup_user() which returns a
negative error code. The error code is negated by the caller and thus
incorrectly converted to a positive error code.

Remove the error negation such that the negative error is passed
correctly back up to userspace.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_ioctl32.c

index ec6772866f3d227d6fe916a74dd9fe331c855ecc..bfc7c7c8a0c884a2ebcc30194a1ccb30373d0955 100644 (file)
@@ -423,7 +423,7 @@ xfs_compat_attrmulti_by_handle(
 
        ops = memdup_user(compat_ptr(am_hreq.ops), size);
        if (IS_ERR(ops)) {
-               error = -PTR_ERR(ops);
+               error = PTR_ERR(ops);
                goto out_dput;
        }