staging: lustre: lnet: use kmalloc/kvmalloc in router_proc
authorNeilBrown <neilb@suse.com>
Tue, 9 Jan 2018 01:19:38 +0000 (12:19 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Jan 2018 14:41:56 +0000 (15:41 +0100)
commit2aa8b1b728da158d8c55f0bd589468183e7865c1
tree3ebe18aa40169ca92faec305926da86c7fe65e3e
parentb9c4b8a15aa54be5adeb725f2680d626a22aa9fe
staging: lustre: lnet: use kmalloc/kvmalloc in router_proc

The buffers allocated in router_proc are to temporarily
hold strings created for procfs files.
So they do not need to be zeroed and are safe to use
GFP_KERNEL.
So use kmalloc() directly except in two cases where it
isn't trivial to confirm that the size is always small.
In those cases, use kvmalloc().

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lnet/lnet/router_proc.c