return ((void *)p)+sizeof(struct alloc_data);
}
-void ceph_kfree(void *ptr)
+void ceph_kfree(const void *ptr)
{
struct alloc_data *p = (struct alloc_data *)(ptr -
sizeof(struct alloc_data));
extern void ceph_bookkeeper_init(void);
extern void ceph_bookkeeper_finalize(void);
extern void *ceph_kmalloc(char *fname, int line, size_t size, gfp_t flags);
-extern void ceph_kfree(void *ptr);
+extern void ceph_kfree(const void *ptr);
+
+
+#endif
+
+#endif
#ifndef CEPH_OVERRIDE_BOOKKEEPER
+#define CEPH_BOOKKEEPER_DEFINED
#define kmalloc(size, flags) ceph_kmalloc(__FILE__, __LINE__, size, flags)
#define kzalloc(size, flags) ceph_kmalloc(__FILE__, __LINE__, size, \
flags | __GFP_ZERO)
#define kfree ceph_kfree
#endif
+#ifdef CEPH_DISABLE_BOOKKEEPER
+#ifdef CEPH_BOOKKEEPER_DEFINED
+#undef kmalloc
+#undef kzalloc
+#undef kfree
#endif
-
#endif
+
#ifndef _FS_CEPH_SUPER_H
#define _FS_CEPH_SUPER_H
+#define CEPH_DISABLE_BOOKKEEPER
+#include "bookkeeper.h"
+
#include <linux/fs.h>
#include <linux/wait.h>
#include <linux/completion.h>
#include <linux/exportfs.h>
#include <linux/backing-dev.h>
+#undef CEPH_DISABLE_BOOKKEEPER
+#include "bookkeeper.h"
+
#include "types.h"
#include "ceph_debug.h"
#include "messenger.h"
#include "mds_client.h"
#include "osd_client.h"
#include "ceph_fs.h"
+#include "bookkeeper.h"
/* f_type in struct statfs */
#define CEPH_SUPER_MAGIC 0x00c36400