diff options
author | Oliver Neukum <neukum@fachschaft.cup.uni-muenchen.de> | 2006-03-25 06:08:13 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-25 11:23:00 -0500 |
commit | 11b0b5abb2097a63c1081d9b7e825b987b227972 (patch) | |
tree | 162c828c8d807a1b30869acbe11682dc9222dc16 /fs/aio.c | |
parent | 656bde5728b824ca23fcab8bc5800b309ea48d64 (diff) |
[PATCH] use kzalloc and kcalloc in core fs code
Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/aio.c')
-rw-r--r-- | fs/aio.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -122,10 +122,9 @@ static int aio_setup_ring(struct kioctx *ctx) | |||
122 | info->nr = 0; | 122 | info->nr = 0; |
123 | info->ring_pages = info->internal_pages; | 123 | info->ring_pages = info->internal_pages; |
124 | if (nr_pages > AIO_RING_PAGES) { | 124 | if (nr_pages > AIO_RING_PAGES) { |
125 | info->ring_pages = kmalloc(sizeof(struct page *) * nr_pages, GFP_KERNEL); | 125 | info->ring_pages = kcalloc(nr_pages, sizeof(struct page *), GFP_KERNEL); |
126 | if (!info->ring_pages) | 126 | if (!info->ring_pages) |
127 | return -ENOMEM; | 127 | return -ENOMEM; |
128 | memset(info->ring_pages, 0, sizeof(struct page *) * nr_pages); | ||
129 | } | 128 | } |
130 | 129 | ||
131 | info->mmap_size = nr_pages * PAGE_SIZE; | 130 | info->mmap_size = nr_pages * PAGE_SIZE; |