提交 4c03f554 编写于 作者: N NeilBrown 提交者: Greg Kroah-Hartman

staging: lustre: cfs_percpt_alloc: use kvmalloc(GFP_KERNEL)

this allocation is called from several places, but all are
during initialization, so GFP_NOFS is not needed.
So use kvmalloc and GFP_KERNEL.
Signed-off-by: NNeilBrown <neilb@suse.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 dc31f99b
......@@ -54,8 +54,7 @@ cfs_percpt_free(void *vars)
LIBCFS_FREE(arr->va_ptrs[i], arr->va_size);
}
LIBCFS_FREE(arr, offsetof(struct cfs_var_array,
va_ptrs[arr->va_count]));
kvfree(arr);
}
EXPORT_SYMBOL(cfs_percpt_free);
......@@ -79,7 +78,8 @@ cfs_percpt_alloc(struct cfs_cpt_table *cptab, unsigned int size)
count = cfs_cpt_number(cptab);
LIBCFS_ALLOC(arr, offsetof(struct cfs_var_array, va_ptrs[count]));
arr = kvzalloc(offsetof(struct cfs_var_array, va_ptrs[count]),
GFP_KERNEL);
if (!arr)
return NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册