diff options
author | Dave Chinner <david@fromorbit.com> | 2014-05-14 19:38:15 -0400 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2014-05-14 19:38:15 -0400 |
commit | ff14ee42a038cf48263ac8d2eca5d30196554b82 (patch) | |
tree | cee5ba7a2b08d7e4f48d974d08ecfc40c8bd1308 /fs/xfs/xfs_ioctl.c | |
parent | b76769294ba400415fc44038c21cc2df86f9a28b (diff) | |
parent | 8cfcc3e565bf15870efe801368a25ca98092e6e7 (diff) |
Merge branch 'xfs-misc-fixes-1-for-3.16' into for-next
Diffstat (limited to 'fs/xfs/xfs_ioctl.c')
-rw-r--r-- | fs/xfs/xfs_ioctl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c index 0b18776b075e..2d8f4fdf07f9 100644 --- a/fs/xfs/xfs_ioctl.c +++ b/fs/xfs/xfs_ioctl.c | |||
@@ -543,10 +543,11 @@ xfs_attrmulti_by_handle( | |||
543 | 543 | ||
544 | ops = memdup_user(am_hreq.ops, size); | 544 | ops = memdup_user(am_hreq.ops, size); |
545 | if (IS_ERR(ops)) { | 545 | if (IS_ERR(ops)) { |
546 | error = PTR_ERR(ops); | 546 | error = -PTR_ERR(ops); |
547 | goto out_dput; | 547 | goto out_dput; |
548 | } | 548 | } |
549 | 549 | ||
550 | error = ENOMEM; | ||
550 | attr_name = kmalloc(MAXNAMELEN, GFP_KERNEL); | 551 | attr_name = kmalloc(MAXNAMELEN, GFP_KERNEL); |
551 | if (!attr_name) | 552 | if (!attr_name) |
552 | goto out_kfree_ops; | 553 | goto out_kfree_ops; |
@@ -556,7 +557,7 @@ xfs_attrmulti_by_handle( | |||
556 | ops[i].am_error = strncpy_from_user((char *)attr_name, | 557 | ops[i].am_error = strncpy_from_user((char *)attr_name, |
557 | ops[i].am_attrname, MAXNAMELEN); | 558 | ops[i].am_attrname, MAXNAMELEN); |
558 | if (ops[i].am_error == 0 || ops[i].am_error == MAXNAMELEN) | 559 | if (ops[i].am_error == 0 || ops[i].am_error == MAXNAMELEN) |
559 | error = -ERANGE; | 560 | error = ERANGE; |
560 | if (ops[i].am_error < 0) | 561 | if (ops[i].am_error < 0) |
561 | break; | 562 | break; |
562 | 563 | ||