[OpenAFS-devel] Patch for RH Linux kernel 2.2.17-14(smp)
Alf Wachsmann
alfw@SLAC.Stanford.EDU
Fri, 16 Aug 2002 13:17:30 -0700 (PDT)
The following patch for OpenAFS-1.2.6 makes it load and run on
Red Hat 6.2 with kernel 2.2.17-14(smp).
Without this patch "insmod" complains about "set_current_state"
beeing unknown.
-- Alf.
--- openafs-1.2.6/src/rx/LINUX/rx_kmutex.h.orig Fri Aug 16 13:10:22 2002
+++ openafs-1.2.6/src/rx/LINUX/rx_kmutex.h Fri Aug 16 13:10:32 2002
@@ -116,7 +116,11 @@
#endif
add_wait_queue(cv, &wait);
- set_current_state(TASK_INTERRUPTIBLE);
+ #ifdef set_current_state
+ set_current_state(TASK_INTERRUPTIBLE);
+ #else
+ current->state = TASK_INTERRUPTIBLE;
+ #endif
if (isAFSGlocked) AFS_GUNLOCK();
MUTEX_EXIT(l);
@@ -153,7 +157,11 @@
#endif
add_wait_queue(cv, &wait);
- set_current_state(TASK_INTERRUPTIBLE);
+ #ifdef set_current_state
+ set_current_state(TASK_INTERRUPTIBLE);
+ #else
+ current->state = TASK_INTERRUPTIBLE;
+ #endif
if (isAFSGlocked) AFS_GUNLOCK();
MUTEX_EXIT(l);