]> git.baikalelectronics.ru Git - kernel.git/commit
kernfs: kvmalloc xattr value instead of kmalloc
authorDaniel Xu <dxu@dxuuu.xyz>
Thu, 12 Mar 2020 20:03:14 +0000 (13:03 -0700)
committerTejun Heo <tj@kernel.org>
Mon, 16 Mar 2020 19:53:47 +0000 (15:53 -0400)
commitbd7eca96bd4be8f12ad97a55cb31116929267068
treef9ea506b4f94759dd3ceab39e8a3d25ed6689891
parente527c1c38e0a2d11a97b37822eaa8e2ffd297280
kernfs: kvmalloc xattr value instead of kmalloc

xattr values have a 64k maximum size. This can result in an order 4
kmalloc request which can be difficult to fulfill. Since xattrs do not
need physically contiguous memory, we can switch to kvmalloc and not
have to worry about higher order allocations failing.

Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
Acked-by: Chris Down <chris@chrisdown.name>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
fs/xattr.c