diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/fuse.c | 22 |
2 files changed, 16 insertions, 11 deletions
@@ -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 @@ -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; |