[XFS] Cleanup xfs_attr a bit with xfs_name and remove cred
SGI-PV: 976035 SGI-Modid: xfs-linux-melb:xfs-kern:30913a Signed-off-by: Barry Naujok <bnaujok@sgi.com> Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
This commit is contained in:

committed by
Lachlan McIlroy

parent
5df78e73d3
commit
e8b0ebaa11
@@ -505,14 +505,14 @@ xfs_attrmulti_attr_get(
|
||||
{
|
||||
char *kbuf;
|
||||
int error = EFAULT;
|
||||
|
||||
|
||||
if (*len > XATTR_SIZE_MAX)
|
||||
return EINVAL;
|
||||
kbuf = kmalloc(*len, GFP_KERNEL);
|
||||
if (!kbuf)
|
||||
return ENOMEM;
|
||||
|
||||
error = xfs_attr_get(XFS_I(inode), name, kbuf, (int *)len, flags, NULL);
|
||||
error = xfs_attr_get(XFS_I(inode), name, kbuf, (int *)len, flags);
|
||||
if (error)
|
||||
goto out_kfree;
|
||||
|
||||
@@ -546,7 +546,7 @@ xfs_attrmulti_attr_set(
|
||||
|
||||
if (copy_from_user(kbuf, ubuf, len))
|
||||
goto out_kfree;
|
||||
|
||||
|
||||
error = xfs_attr_set(XFS_I(inode), name, kbuf, len, flags);
|
||||
|
||||
out_kfree:
|
||||
|
Reference in New Issue
Block a user