diff options
author | Emmanuel Dreyfus <manu@netbsd.org> | 2011-12-08 10:53:48 +0000 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2011-12-08 13:44:19 +0100 |
commit | 1bf98cf7bcefc810775e1aa80991a13e6070090c (patch) | |
tree | c533db0ab7a735a2adf30377429d80e4e78a2ecc | |
parent | e081e64490923b08c440ba001747c933007c4602 (diff) | |
download | android_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-- | 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; |