mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 23:10:58 +00:00
Linux: Remove old code from RX kernel implementation
The RX implementation was split into LINUX and LINUX24 along with the kernel, but the old 2.4 and 2.2 only code was never removed from the LINUX/ directory. Do so now. Change-Id: I80300a1390e297298f4af3c06086e25d0acf8c1a Reviewed-on: http://gerrit.openafs.org/1819 Reviewed-by: Derrick Brashear <shadow@dementia.org> Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com> Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
d6d82659d0
commit
06f8a6232b
@ -111,7 +111,6 @@ afs_cv_wait(afs_kcondvar_t * cv, afs_kmutex_t * l, int sigok)
|
||||
|
||||
while(seq == cv->seq) {
|
||||
schedule();
|
||||
#ifdef AFS_LINUX26_ENV
|
||||
#ifdef CONFIG_PM
|
||||
if (
|
||||
#ifdef PF_FREEZE
|
||||
@ -134,7 +133,6 @@ afs_cv_wait(afs_kcondvar_t * cv, afs_kmutex_t * l, int sigok)
|
||||
refrigerator();
|
||||
#endif
|
||||
set_current_state(TASK_INTERRUPTIBLE);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -55,11 +55,7 @@ typedef struct afs_kmutex {
|
||||
|
||||
typedef struct afs_kcondvar {
|
||||
int seq;
|
||||
#if defined(AFS_LINUX24_ENV)
|
||||
wait_queue_head_t waitq;
|
||||
#else
|
||||
struct wait_queue *waitq;
|
||||
#endif
|
||||
} afs_kcondvar_t;
|
||||
|
||||
static inline int
|
||||
@ -74,21 +70,13 @@ MUTEX_ISMINE(afs_kmutex_t * l)
|
||||
#define MUTEX_TRYENTER afs_mutex_tryenter
|
||||
#define MUTEX_EXIT afs_mutex_exit
|
||||
|
||||
#if defined(AFS_LINUX24_ENV)
|
||||
#define CV_INIT(cv,b,c,d) do { (cv)->seq = 0; init_waitqueue_head(&(cv)->waitq); } while (0)
|
||||
#else
|
||||
#define CV_INIT(cv,b,c,d) do { (cv)->seq = 0; init_waitqueue(&(cv)->waitq); } while (0)
|
||||
#endif
|
||||
#define CV_DESTROY(cv)
|
||||
#define CV_WAIT_SIG(cv, m) afs_cv_wait(cv, m, 1)
|
||||
#define CV_WAIT(cv, m) afs_cv_wait(cv, m, 0)
|
||||
#define CV_TIMEDWAIT afs_cv_timedwait
|
||||
|
||||
#define CV_SIGNAL(cv) do { ++(cv)->seq; wake_up(&(cv)->waitq); } while (0)
|
||||
#if defined(AFS_LINUX24_ENV)
|
||||
#define CV_BROADCAST(cv) do { ++(cv)->seq; wake_up_all(&(cv)->waitq); } while (0)
|
||||
#else
|
||||
#define CV_BROADCAST(cv) do { ++(cv)->seq; wake_up(&(cv)->waitq); } while (0)
|
||||
#endif
|
||||
|
||||
#endif /* RX_KMUTEX_H_ */
|
||||
|
@ -17,11 +17,8 @@
|
||||
|
||||
|
||||
#include <linux/version.h>
|
||||
#ifdef AFS_LINUX22_ENV
|
||||
#include "rx/rx_kcommon.h"
|
||||
#if defined(AFS_LINUX24_ENV)
|
||||
#include "h/smp_lock.h"
|
||||
#endif
|
||||
#include <asm/uaccess.h>
|
||||
#ifdef ADAPT_PMTU
|
||||
#include <linux/errqueue.h>
|
||||
@ -64,11 +61,7 @@ rxk_NewSocketHost(afs_uint32 ahost, short aport)
|
||||
sockp->ops->bind(sockp, (struct sockaddr *)&myaddr, sizeof(myaddr));
|
||||
|
||||
if (code < 0) {
|
||||
#if defined(AFS_LINUX24_ENV)
|
||||
printk("sock_release(rx_socket) FIXME\n");
|
||||
#else
|
||||
sock_release(sockp);
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -266,41 +259,35 @@ 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
|
||||
# ifdef PF_FREEZE
|
||||
current->flags & PF_FREEZE
|
||||
#else
|
||||
#if defined(STRUCT_TASK_STRUCT_HAS_TODO)
|
||||
# else
|
||||
# if defined(STRUCT_TASK_STRUCT_HAS_TODO)
|
||||
!current->todo
|
||||
#else
|
||||
#if defined(STRUCT_TASK_STRUCT_HAS_THREAD_INFO)
|
||||
# else
|
||||
# if defined(STRUCT_TASK_STRUCT_HAS_THREAD_INFO)
|
||||
test_ti_thread_flag(current->thread_info, TIF_FREEZE)
|
||||
#else
|
||||
# else
|
||||
test_ti_thread_flag(task_thread_info(current), TIF_FREEZE)
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
)
|
||||
#ifdef LINUX_REFRIGERATOR_TAKES_PF_FREEZE
|
||||
# ifdef LINUX_REFRIGERATOR_TAKES_PF_FREEZE
|
||||
refrigerator(PF_FREEZE);
|
||||
#else
|
||||
# else
|
||||
refrigerator();
|
||||
#endif
|
||||
# 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().
|
||||
*/
|
||||
#ifdef AFS_LINUX22_ENV
|
||||
flush_signals(current); /* We don't want no stinkin' signals. */
|
||||
#else
|
||||
current->signal = 0; /* We don't want no stinkin' signals. */
|
||||
#endif
|
||||
rxk_lastSocketError = code;
|
||||
rxk_nSocketErrors++;
|
||||
} else {
|
||||
@ -310,9 +297,7 @@ osi_NetReceive(osi_socket so, struct sockaddr_in *from, struct iovec *iov,
|
||||
|
||||
return code;
|
||||
}
|
||||
#ifdef EXPORTED_TASKLIST_LOCK
|
||||
extern rwlock_t tasklist_lock __attribute__((weak));
|
||||
#endif
|
||||
|
||||
void
|
||||
osi_StopListener(void)
|
||||
{
|
||||
@ -331,4 +316,3 @@ osi_StopListener(void)
|
||||
rx_socket = NULL;
|
||||
}
|
||||
|
||||
#endif /* AFS_LINUX22_ENV */
|
||||
|
Loading…
Reference in New Issue
Block a user