]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
refridgerator-update-20060227
authorChaskiel M Grundman <cg2v@andrew.cmu.edu>
Thu, 2 Mar 2006 06:39:45 +0000 (06:39 +0000)
committerDerrick Brashear <shadow@dementia.org>
Thu, 2 Mar 2006 06:39:45 +0000 (06:39 +0000)
try to make refrigerator work again

src/rx/LINUX/rx_kmutex.c
src/rx/LINUX/rx_knet.c

index ea31a87824e09e2023a6a429cfb368956ad992ad..b1d8bf99aabd37e24866ee3331c8c0d85d2645b3 100644 (file)
@@ -99,7 +99,23 @@ afs_cv_wait(afs_kcondvar_t * cv, afs_kmutex_t * l, int sigok)
 
     while(seq == cv->seq) {
        schedule();
-       /* should we refrigerate? */
+#ifdef AFS_LINUX26_ENV
+#ifdef CONFIG_PM
+       if (
+#ifdef PF_FREEZE
+           current->flags & PF_FREEZE
+#else
+           !current->todo
+#endif
+           )
+#ifdef LINUX_REFRIGERATOR_TAKES_PF_FREEZE
+           refrigerator(PF_FREEZE);
+#else
+           refrigerator();
+#endif
+           set_current_state(TASK_INTERRUPTIBLE);
+#endif
+#endif
     }
 
     remove_wait_queue(&cv->waitq, &wait);
index 7cddc228c0e3dbc9c683a87db7e46a954fa62e7f..b0b7d9c0654ea22b5f326e8d38d13eb4feb9fcdf 100644 (file)
@@ -164,6 +164,24 @@ osi_NetReceive(osi_socket so, struct sockaddr_in *from, struct iovec *iov,
     TO_KERNEL_SPACE();
 
     if (code < 0) {
+#ifdef AFS_LINUX26_ENV
+#ifdef CONFIG_PM
+       if (
+#ifdef PF_FREEZE
+           current->flags & PF_FREEZE
+#else
+           !current->todo
+#endif
+           )
+#ifdef LINUX_REFRIGERATOR_TAKES_PF_FREEZE
+           refrigerator(PF_FREEZE);
+#else
+           refrigerator();
+#endif
+           set_current_state(TASK_INTERRUPTIBLE);
+#endif
+#endif
+
        /* Clear the error before using the socket again.
         * Oh joy, Linux has hidden header files as well. It appears we can
         * simply call again and have it clear itself via sock_error().