Skip to content

Commit aa13b70

Browse files
KunWuChanpcmoore
authored andcommitted
audit: use KMEM_CACHE() instead of kmem_cache_create()
Use the new KMEM_CACHE() macro instead of direct kmem_cache_create to simplify the creation of SLAB caches. Signed-off-by: Kunwu Chan <[email protected]> [PM: subject line tweaks] Signed-off-by: Paul Moore <[email protected]>
1 parent 3104d0e commit aa13b70

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

kernel/audit.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1693,9 +1693,7 @@ static int __init audit_init(void)
16931693
if (audit_initialized == AUDIT_DISABLED)
16941694
return 0;
16951695

1696-
audit_buffer_cache = kmem_cache_create("audit_buffer",
1697-
sizeof(struct audit_buffer),
1698-
0, SLAB_PANIC, NULL);
1696+
audit_buffer_cache = KMEM_CACHE(audit_buffer, SLAB_PANIC);
16991697

17001698
skb_queue_head_init(&audit_queue);
17011699
skb_queue_head_init(&audit_retry_queue);

0 commit comments

Comments
 (0)