diff options
Diffstat (limited to 'arch/ia64/kernel/perfmon.c')
-rw-r--r-- | arch/ia64/kernel/perfmon.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index 3aaede0d6981..aa94f60fa8e7 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -853,9 +853,8 @@ pfm_context_alloc(void) | |||
853 | * allocate context descriptor | 853 | * allocate context descriptor |
854 | * must be able to free with interrupts disabled | 854 | * must be able to free with interrupts disabled |
855 | */ | 855 | */ |
856 | ctx = kmalloc(sizeof(pfm_context_t), GFP_KERNEL); | 856 | ctx = kzalloc(sizeof(pfm_context_t), GFP_KERNEL); |
857 | if (ctx) { | 857 | if (ctx) { |
858 | memset(ctx, 0, sizeof(pfm_context_t)); | ||
859 | DPRINT(("alloc ctx @%p\n", ctx)); | 858 | DPRINT(("alloc ctx @%p\n", ctx)); |
860 | } | 859 | } |
861 | return ctx; | 860 | return ctx; |
@@ -2189,13 +2188,13 @@ pfm_alloc_fd(struct file **cfile) | |||
2189 | /* | 2188 | /* |
2190 | * allocate a new dcache entry | 2189 | * allocate a new dcache entry |
2191 | */ | 2190 | */ |
2192 | file->f_dentry = d_alloc(pfmfs_mnt->mnt_sb->s_root, &this); | 2191 | file->f_path.dentry = d_alloc(pfmfs_mnt->mnt_sb->s_root, &this); |
2193 | if (!file->f_dentry) goto out; | 2192 | if (!file->f_path.dentry) goto out; |
2194 | 2193 | ||
2195 | file->f_dentry->d_op = &pfmfs_dentry_operations; | 2194 | file->f_path.dentry->d_op = &pfmfs_dentry_operations; |
2196 | 2195 | ||
2197 | d_add(file->f_dentry, inode); | 2196 | d_add(file->f_path.dentry, inode); |
2198 | file->f_vfsmnt = mntget(pfmfs_mnt); | 2197 | file->f_path.mnt = mntget(pfmfs_mnt); |
2199 | file->f_mapping = inode->i_mapping; | 2198 | file->f_mapping = inode->i_mapping; |
2200 | 2199 | ||
2201 | file->f_op = &pfm_file_ops; | 2200 | file->f_op = &pfm_file_ops; |
@@ -2302,7 +2301,7 @@ pfm_smpl_buffer_alloc(struct task_struct *task, pfm_context_t *ctx, unsigned lon | |||
2302 | DPRINT(("smpl_buf @%p\n", smpl_buf)); | 2301 | DPRINT(("smpl_buf @%p\n", smpl_buf)); |
2303 | 2302 | ||
2304 | /* allocate vma */ | 2303 | /* allocate vma */ |
2305 | vma = kmem_cache_alloc(vm_area_cachep, SLAB_KERNEL); | 2304 | vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL); |
2306 | if (!vma) { | 2305 | if (!vma) { |
2307 | DPRINT(("Cannot allocate vma\n")); | 2306 | DPRINT(("Cannot allocate vma\n")); |
2308 | goto error_kmem; | 2307 | goto error_kmem; |