groups: simplify struct group_info allocation
authorHubert Jasudowicz <hubert.jasudowicz@gmail.com>
Fri, 26 Feb 2021 01:21:07 +0000 (17:21 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 26 Feb 2021 17:41:03 +0000 (09:41 -0800)
commite1e014115dfd48ab3e3691ce46f9484ce12e67d4
tree985f8c2183614c6e28849299ea3ec9c4d9616a87
parentc1f26493ed7f363c63e0e9d91e50d4db26df6603
groups: simplify struct group_info allocation

Combine kmalloc and vmalloc into a single call.  Use struct_size macro
instead of direct size calculation.

Link: https://lkml.kernel.org/r/ba9ba5beea9a44b7196c41a0d9528abd5f20dd2e.1611620846.git.hubert.jasudowicz@gmail.com
Signed-off-by: Hubert Jasudowicz <hubert.jasudowicz@gmail.com>
Cc: Gao Xiang <xiang@kernel.org>
Cc: Micah Morton <mortonm@chromium.org>
Cc: Michael Kelley <mikelley@microsoft.com>
Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org>
Cc: Thomas Cedeno <thomascedeno@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/groups.c