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: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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);
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;