From 1bf98cf7bcefc810775e1aa80991a13e6070090c Mon Sep 17 00:00:00 2001 From: Emmanuel Dreyfus Date: Thu, 8 Dec 2011 10:53:48 +0000 Subject: [PATCH] FUSE_NODE_SLAB buildfix When FUSE_NODE_SLAB is not defined, the build fails because of undefined functions. Attached patch fixes the problem. --- ChangeLog | 5 +++++ lib/fuse.c | 22 +++++++++++----------- 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 + + * Fix build if FUSE_NODE_SLAB is not defined. Patch by Emmanuel + Dreyfus + 2011-12-07 Miklos Szeredi * 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; -- 2.30.2