cfs_page_t *page;
struct cfs_trace_page *tage;
+ /* My caller is trying to free memory */
+ if (!cfs_in_interrupt() && cfs_memory_pressure_get())
+ return NULL;
+
/*
* Don't spam console with allocation failures: they will be reported
* by upper layer anyway.
max_nob = CFS_PAGE_SIZE - tage->used - known_size;
if (max_nob <= 0) {
- printk(CFS_KERN_EMERG "negative max_nob: %i\n",
+ printk(CFS_KERN_EMERG "negative max_nob: %d\n",
max_nob);
mask |= D_ERROR;
cfs_trace_put_tcd(tcd);
cfs_waitq_init(&tctl->tctl_waitq);
cfs_atomic_set(&tctl->tctl_shutdown, 0);
- if (cfs_kernel_thread(tracefiled, tctl, 0) < 0) {
+ if (cfs_create_thread(tracefiled, tctl, 0) < 0) {
rc = -ECHILD;
goto out;
}