Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 374821
b: refs/heads/master
c: 7dfbcbe
h: refs/heads/master
i:
  374819: 1b6d90a
v: v3
  • Loading branch information
Eric Sandeen authored and Ben Myers committed May 8, 2013
1 parent 4a23e7e commit 225f441
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: dd700d9452023a5b6820815a88f93c8f7010c270
refs/heads/master: 7dfbcbefad4b24d9822d04dbd7b5dd5c3fd45076
14 changes: 10 additions & 4 deletions trunk/fs/xfs/xfs_ioctl32.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,9 +373,12 @@ xfs_compat_attrlist_by_handle(
return PTR_ERR(dentry);

error = -ENOMEM;
kbuf = kmalloc(al_hreq.buflen, GFP_KERNEL);
if (!kbuf)
goto out_dput;
kbuf = kmem_zalloc(al_hreq.buflen, KM_SLEEP | KM_MAYFAIL);
if (!kbuf) {
kbuf = kmem_zalloc_large(al_hreq.buflen);
if (!kbuf)
goto out_dput;
}

cursor = (attrlist_cursor_kern_t *)&al_hreq.pos;
error = -xfs_attr_list(XFS_I(dentry->d_inode), kbuf, al_hreq.buflen,
Expand All @@ -387,7 +390,10 @@ xfs_compat_attrlist_by_handle(
error = -EFAULT;

out_kfree:
kfree(kbuf);
if (is_vmalloc_addr(kbuf))
kmem_free_large(kbuf);
else
kmem_free(kbuf);
out_dput:
dput(dentry);
return error;
Expand Down

0 comments on commit 225f441

Please sign in to comment.