Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 294637
b: refs/heads/master
c: ad650f5
h: refs/heads/master
i:
  294635: c08ca9e
v: v3
  • Loading branch information
Dave Chinner authored and Ben Myers committed Mar 15, 2012
1 parent 41829a4 commit 583155f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6eb2466036358078aed9a65d702cbc97baf0ce65
refs/heads/master: ad650f5b27bc9858360b42aaa0d9204d16115316
14 changes: 10 additions & 4 deletions trunk/fs/xfs/xfs_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,9 +450,12 @@ xfs_attrmulti_attr_get(

if (*len > XATTR_SIZE_MAX)
return EINVAL;
kbuf = kmalloc(*len, GFP_KERNEL);
if (!kbuf)
return ENOMEM;
kbuf = kmem_zalloc(*len, KM_SLEEP | KM_MAYFAIL);
if (!kbuf) {
kbuf = kmem_zalloc_large(*len);
if (!kbuf)
return ENOMEM;
}

error = xfs_attr_get(XFS_I(inode), name, kbuf, (int *)len, flags);
if (error)
Expand All @@ -462,7 +465,10 @@ xfs_attrmulti_attr_get(
error = EFAULT;

out_kfree:
kfree(kbuf);
if (is_vmalloc_addr(kbuf))
kmem_free_large(kbuf);
else
kmem_free(kbuf);
return error;
}

Expand Down

0 comments on commit 583155f

Please sign in to comment.