staging: lustre: lnet: selftest: don't allocate small strings.
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)
commitb9c4b8a15aa54be5adeb725f2680d626a22aa9fe
treeae3cd8be6788d9dd4d69a7cb890190c1835900a9
parent3872fb73cabdd47fd4abf7b6eff21d06e57297eb
staging: lustre: lnet: selftest: don't allocate small strings.

All of the "name" buffers here are at most LST_NAME_SIZE+1
bytes, so 33 bytes at most.
They are only used temporarily during the life of the function
that allocates them.
So it is much simpler to just allocate on the stack.
Worst case is lst_tet_add_ioct(), which allocates
3 for these which 99 bytes on the stack, instead of the 24 that would
have been allocated for 64-bit pointers.

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