mm/vmpressure.c: use kstrndup instead of kmalloc+strncpy
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 8 Jun 2018 00:07:50 +0000 (17:07 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 8 Jun 2018 00:34:36 +0000 (17:34 -0700)
commitd62ff365b812ecd7415252568c1836811b3dde02
tree1ea4e12f13469cf607bdd46a8686d39ad423b319
parentbf8d5d52ffe89aac5b46ddb39dd1a4351fae5df4
mm/vmpressure.c: use kstrndup instead of kmalloc+strncpy

Using kstrndup() simplifies the code.

Link: http://lkml.kernel.org/r/20180503201807.24941-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/vmpressure.c