Linux: Don't hide memory management
[openafs.git] / src / afs / LINUX / osi_machdep.h
index f807ae2..528e862 100644 (file)
@@ -119,20 +119,8 @@ static inline time_t osi_Time(void) {
 #define IsAfsVnode(V) ((V)->i_sb == afs_globalVFS)     /* test superblock instead */
 #define SetAfsVnode(V)                                 /* unnecessary */
 
-/* We often need to pretend we're in user space to get memory transfers
- * right for the kernel calls we use.
- */
 #include <asm/uaccess.h>
 
-#ifdef KERNEL_SPACE_DECL
-#undef KERNEL_SPACE_DECL
-#undef TO_USER_SPACE
-#undef TO_KERNEL_SPACE
-#endif
-#define KERNEL_SPACE_DECL mm_segment_t _fs_space_decl={0}
-#define TO_USER_SPACE() { _fs_space_decl = get_fs(); set_fs(get_ds()); }
-#define TO_KERNEL_SPACE() set_fs(_fs_space_decl)
-
 #define copyin(F, T, C)  (copy_from_user ((char*)(T), (char*)(F), (C)) > 0 ? EFAULT : 0)
 static inline long copyinstr(char *from, char *to, int count, int *length) {
     long tmp;
@@ -260,7 +248,6 @@ typedef struct uio {
 #define NEED_IOCTL32
 #endif
 
-#if defined(__KERNEL__)
 #include <linux/version.h>
 #include <linux/sched.h>
 #include <linux/wait.h>
@@ -295,13 +282,6 @@ do { \
 
 #define osi_InitGlock()
 
-#else
-#define AFS_GLOCK()
-#define AFS_GUNLOCK()
-#define ISAFS_GLOCK() 1
-#define AFS_ASSERT_GLOCK()
-#endif
-
 #ifdef AFS_AMD64_LINUX20_ENV
 /* RHEL5 beta's kernel doesn't define these. They aren't gonna change, so... */
 
@@ -364,4 +344,6 @@ do { \
 #endif
 #endif
 
+#define osi_procname(procname, size) strncpy(procname, current->comm, size)
+
 #endif /* OSI_MACHDEP_H_ */