mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
[PATCH] use kzalloc and kcalloc in core fs code
Signed-off-by: Oliver Neukum <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
656bde5728
commit
11b0b5abb2
8 changed files with 10 additions and 22 deletions
3
fs/aio.c
3
fs/aio.c
|
|
@ -122,10 +122,9 @@ static int aio_setup_ring(struct kioctx *ctx)
|
|||
info->nr = 0;
|
||||
info->ring_pages = info->internal_pages;
|
||||
if (nr_pages > AIO_RING_PAGES) {
|
||||
info->ring_pages = kmalloc(sizeof(struct page *) * nr_pages, GFP_KERNEL);
|
||||
info->ring_pages = kcalloc(nr_pages, sizeof(struct page *), GFP_KERNEL);
|
||||
if (!info->ring_pages)
|
||||
return -ENOMEM;
|
||||
memset(info->ring_pages, 0, sizeof(struct page *) * nr_pages);
|
||||
}
|
||||
|
||||
info->mmap_size = nr_pages * PAGE_SIZE;
|
||||
|
|
|
|||
Loading…
Reference in a new issue