mm/slub: move struct track init out of set_track()
authorVlastimil Babka <vbabka@suse.cz>
Fri, 4 Feb 2022 16:44:40 +0000 (17:44 +0100)
committerVlastimil Babka <vbabka@suse.cz>
Wed, 6 Apr 2022 08:57:38 +0000 (10:57 +0200)
commit0cd1a02901858049d14b5b9d4c5c680b012c8cc1
tree164f4beeb9e22b9b6126c6c36496da6e3d4c90d5
parenta5f1783be29adae15666fd803efd7d2979130869
mm/slub: move struct track init out of set_track()

set_track() either zeroes out the struct track or fills it, depending on
the addr parameter. This is unnecessary as there's only one place that
calls it for the initialization - init_tracking(). We can simply do the
zeroing there, with a single memset() that covers both TRACK_ALLOC and
TRACK_FREE as they are adjacent.

Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Reviewed-and-tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Acked-by: David Rientjes <rientjes@google.com>
mm/slub.c