diff options
author | Christoph Hellwig <hch@lst.de> | 2020-02-27 04:30:45 +0300 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2020-03-03 07:55:55 +0300 |
commit | 5680c39073611b1490a311d351d648f602aa8d13 (patch) | |
tree | 0611723a0d1b60891d89c01aa202f8a689ae9a3b /fs/xfs/xfs_ioctl.c | |
parent | ed02d13f5da896f5563b3673dd16db6c268c0f83 (diff) | |
download | linux-5680c39073611b1490a311d351d648f602aa8d13.tar.xz |
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 <dchinner@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_ioctl.c')
-rw-r--r-- | fs/xfs/xfs_ioctl.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c index ef8e378c42cb..5a1d2b9cb05a 100644 --- a/fs/xfs/xfs_ioctl.c +++ b/fs/xfs/xfs_ioctl.c @@ -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; |