]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE12-linux22-also-alloc-avoid-potential-recursion-freeing-memory-and-schedule...
authorNickolai Zeldovich <kolya@mit.edu>
Sun, 20 Jan 2002 08:42:32 +0000 (08:42 +0000)
committerDerrick Brashear <shadow@dementia.org>
Sun, 20 Jan 2002 08:42:32 +0000 (08:42 +0000)
linux 2.2 lacks set_current_state. currently in 2.4 it's a definition and not a real function, so this will work

src/afs/LINUX/osi_alloc.c

index 580e899610bee9df643b0e2286d94d02c7549adf..46ebc4b54bc1188758eb196df153343c3154dd5a 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 */