Skip to content

Commit 8488b19

Browse files
committed
fix for 4.4 kernels where __GFP_WAIT got renamed to __GFP_RECLAIM.
1 parent af0f443 commit 8488b19

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

driver/ctf_subr.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242
void *
4343
ctf_data_alloc(size_t size)
4444
{
45+
# if !defined(__GFP_WAIT)
46+
# define __GFP_WAIT __GFP_RECLAIM
47+
# endif
4548
void *buf = kmalloc(size, GFP_KERNEL & ~__GFP_WAIT);
4649

4750
if (buf == NULL)

driver/taskq.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,9 @@ taskq_dispatch2(taskq_t *tq, task_func_t func, void *arg, uint_t flags, unsigned
272272
if (!taskq_enabled)
273273
return 0;
274274

275+
# if !defined(__GFP_WAIT)
276+
# define __GFP_WAIT __GFP_RECLAIM
277+
# endif
275278
work = (my_work_t *)kmalloc(sizeof(my_work_t), GFP_KERNEL & ~__GFP_WAIT);
276279
if (work == NULL) {
277280
printk("taskq_dispatch: couldnt alloc work buffer\n");

0 commit comments

Comments
 (0)