summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage.weil@dreamhost.com>2011-09-04 20:54:22 -0700
committerSage Weil <sage.weil@dreamhost.com>2011-09-06 21:03:06 -0700
commitf6df0ae70a586369107ac0a9c2b250d216c66aa5 (patch)
tree0b5f047e77462be7806971152e48b42e1c1b9994
parent9c0793d4cc2ab1f1c14e9512293cff070a50b2d2 (diff)
downloadceph-historic/wip-crush-pushpop.tar.gz
crush: don't try to share #include sections with kernelhistoric/wip-crush-pushpop
This is already out of sync, and it's easy enough to no merge it while keeping the rest of the .c in sync. Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
-rw-r--r--src/crush/crush.c12
-rw-r--r--src/crush/mapper.c29
2 files changed, 13 insertions, 28 deletions
diff --git a/src/crush/crush.c b/src/crush/crush.c
index 0790b80facc..80bda0082be 100644
--- a/src/crush/crush.c
+++ b/src/crush/crush.c
@@ -1,12 +1,8 @@
-#ifdef __KERNEL__
-# include <linux/slab.h>
-#else
-# include <stdlib.h>
-# include <assert.h>
-# define kfree(x) do { if (x) free(x); } while (0)
-# define BUG_ON(x) assert(!(x))
-#endif
+#include <stdlib.h>
+#include <assert.h>
+#define kfree(x) do { if (x) free(x); } while (0)
+#define BUG_ON(x) assert(!(x))
#include "crush.h"
diff --git a/src/crush/mapper.c b/src/crush/mapper.c
index 22c0b4933d0..e88410c1b7b 100644
--- a/src/crush/mapper.c
+++ b/src/crush/mapper.c
@@ -1,24 +1,13 @@
-#ifdef __KERNEL__
-# include <linux/string.h>
-# include <linux/slab.h>
-# include <linux/bug.h>
-# include <linux/kernel.h>
-# include <linux/errno.h>
-# ifndef dprintk
-# define dprintk(args...)
-# endif
-#else
-# include <string.h>
-# include <stdio.h>
-# include <stdlib.h>
-# include <assert.h>
-# include <errno.h>
-# define BUG_ON(x) assert(!(x))
-# define dprintk(args...) /* printf(args) */
-# define kmalloc(x, f) malloc(x)
-# define kfree(x) free(x)
-#endif
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <errno.h>
+#define BUG_ON(x) assert(!(x))
+#define dprintk(args...) /* printf(args) */
+#define kmalloc(x, f) malloc(x)
+#define kfree(x) free(x)
#include "crush.h"
#include "hash.h"