aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmmanuel Dreyfus <manu@netbsd.org>2011-12-08 10:53:48 +0000
committerMiklos Szeredi <mszeredi@suse.cz>2011-12-08 13:44:19 +0100
commit1bf98cf7bcefc810775e1aa80991a13e6070090c (patch)
treec533db0ab7a735a2adf30377429d80e4e78a2ecc
parente081e64490923b08c440ba001747c933007c4602 (diff)
downloadandroid_external_fuse-1bf98cf7bcefc810775e1aa80991a13e6070090c.tar.gz
android_external_fuse-1bf98cf7bcefc810775e1aa80991a13e6070090c.tar.bz2
android_external_fuse-1bf98cf7bcefc810775e1aa80991a13e6070090c.zip
FUSE_NODE_SLAB buildfix
When FUSE_NODE_SLAB is not defined, the build fails because of undefined functions. Attached patch fixes the problem.
-rw-r--r--ChangeLog5
-rw-r--r--lib/fuse.c22
2 files changed, 16 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 3f6133d..ad42adc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-12-08 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix build if FUSE_NODE_SLAB is not defined. Patch by Emmanuel
+ Dreyfus
+
2011-12-07 Miklos Szeredi <miklos@szeredi.hu>
* Add fuse_lowlevel_notify_delete() which tells the kernel that a
diff --git a/lib/fuse.c b/lib/fuse.c
index db638ec..7f421b4 100644
--- a/lib/fuse.c
+++ b/lib/fuse.c
@@ -343,17 +343,6 @@ static inline void list_del(struct list_head *entry)
prev->next = next;
}
-#ifdef FUSE_NODE_SLAB
-static struct node_slab *list_to_slab(struct list_head *head)
-{
- return (struct node_slab *) head;
-}
-
-static struct node_slab *node_to_slab(struct fuse *f, struct node *node)
-{
- return (struct node_slab *) (((uintptr_t) node) & ~((uintptr_t) f->pagesize - 1));
-}
-
static inline int lru_enabled(struct fuse *f)
{
return f->conf.remember > 0;
@@ -372,6 +361,17 @@ static size_t get_node_size(struct fuse *f)
return sizeof(struct node);
}
+#ifdef FUSE_NODE_SLAB
+static struct node_slab *list_to_slab(struct list_head *head)
+{
+ return (struct node_slab *) head;
+}
+
+static struct node_slab *node_to_slab(struct fuse *f, struct node *node)
+{
+ return (struct node_slab *) (((uintptr_t) node) & ~((uintptr_t) f->pagesize - 1));
+}
+
static int alloc_slab(struct fuse *f)
{
void *mem;