Skip to content

Commit 5680c39

Browse files
Christoph Hellwigdjwong
authored andcommitted
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: Dave Chinner <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Dave Chinner <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
1 parent ed02d13 commit 5680c39

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

fs/xfs/xfs_ioctl.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -481,10 +481,6 @@ xfs_attrmulti_attr_get(
481481
if (*len > XFS_XATTR_SIZE_MAX)
482482
return -EINVAL;
483483

484-
args.value = kmem_zalloc_large(*len, 0);
485-
if (!args.value)
486-
return -ENOMEM;
487-
488484
error = xfs_attr_get(&args);
489485
if (error)
490486
goto out_kfree;

0 commit comments

Comments
 (0)