aboutsummaryrefslogtreecommitdiffstats
path: root/fs/aio.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/aio.c')
-rw-r--r--fs/aio.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/aio.c b/fs/aio.c
index ee662589e5ec..0b4ee0a5c83e 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -211,11 +211,10 @@ static struct kioctx *ioctx_alloc(unsigned nr_events)
211 if ((unsigned long)nr_events > aio_max_nr) 211 if ((unsigned long)nr_events > aio_max_nr)
212 return ERR_PTR(-EAGAIN); 212 return ERR_PTR(-EAGAIN);
213 213
214 ctx = kmem_cache_alloc(kioctx_cachep, GFP_KERNEL); 214 ctx = kmem_cache_zalloc(kioctx_cachep, GFP_KERNEL);
215 if (!ctx) 215 if (!ctx)
216 return ERR_PTR(-ENOMEM); 216 return ERR_PTR(-ENOMEM);
217 217
218 memset(ctx, 0, sizeof(*ctx));
219 ctx->max_reqs = nr_events; 218 ctx->max_reqs = nr_events;
220 mm = ctx->mm = current->mm; 219 mm = ctx->mm = current->mm;
221 atomic_inc(&mm->mm_count); 220 atomic_inc(&mm->mm_count);