Linux: The kernel module always runs in the kernel
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Fri, 23 Apr 2010 16:10:15 +0000 (17:10 +0100)
committerDerrick Brashear <shadow@dementia.org>
Mon, 26 Apr 2010 04:32:55 +0000 (21:32 -0700)
There's no situation where we'd be including osi_machdep.h and not
be building for the kernel, so just remove the case that disables all of
the locks if __KERNEL__ isn't defined.

Change-Id: I1141c37cf0cd517191dee7ca2404e109d4053c29
Reviewed-on: http://gerrit.openafs.org/1821
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

src/afs/LINUX/osi_machdep.h

index f1dd158..4222caf 100644 (file)
@@ -260,7 +260,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 +294,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... */