]> Git Repo - linux.git/blobdiff - kernel/audit_tree.c
Merge tag 'fsnotify_for_v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux.git] / kernel / audit_tree.c
index 025d24abf15d962f4760c89ffb5971592371df0b..83e1c07fc99e1e838e781e5245d7778d323c9812 100644 (file)
@@ -188,11 +188,9 @@ static struct fsnotify_mark *alloc_mark(void)
 static struct audit_chunk *alloc_chunk(int count)
 {
        struct audit_chunk *chunk;
-       size_t size;
        int i;
 
-       size = offsetof(struct audit_chunk, owners) + count * sizeof(struct node);
-       chunk = kzalloc(size, GFP_KERNEL);
+       chunk = kzalloc(struct_size(chunk, owners, count), GFP_KERNEL);
        if (!chunk)
                return NULL;
 
This page took 0.033067 seconds and 4 git commands to generate.