Commit 5680c390 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Darrick J. Wong

xfs: switch xfs_attrmulti_attr_get to lazy attr buffer allocation

Let the low-level attr code only allocate the needed buffer size
for xfs_attrmulti_attr_get instead of allocating the upper bound
at the top of the call chain.
Suggested-by: default avatarDave Chinner <dchinner@redhat.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
parent ed02d13f
......@@ -481,10 +481,6 @@ xfs_attrmulti_attr_get(
if (*len > XFS_XATTR_SIZE_MAX)
return -EINVAL;
args.value = kmem_zalloc_large(*len, 0);
if (!args.value)
return -ENOMEM;
error = xfs_attr_get(&args);
if (error)
goto out_kfree;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment