linux22-also-alloc-avoid-potential-recursion-freeing-memory-and-schedule-when-vmalloc...
[openafs.git] / src / afs / LINUX / osi_alloc.c
index 580e899..46ebc4b 100644 (file)
@@ -103,7 +103,11 @@ static void *linux_alloc(unsigned int asize)
             if (--max_wait <=0) {
                break;
             }
+#ifdef set_current_state
            set_current_state(TASK_INTERRUPTIBLE);
+#else
+           current->state = TASK_INTERRUPTIBLE;
+#endif
            schedule_timeout(HZ);
         }
        if (new) /* piggy back alloc type */