diff options
author | David Howells <dhowells@redhat.com> | 2013-05-10 19:50:25 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2013-06-19 14:16:47 +0100 |
commit | 610be24ee434aa89197f06f30fef02be83c006a5 (patch) | |
tree | d9bf801f4e81c4cee1dc20fa444e0a3d17c6372a /include | |
parent | 0c59a95d90081e5d840649d4f872027123e3420c (diff) | |
download | lwn-610be24ee434aa89197f06f30fef02be83c006a5.tar.gz lwn-610be24ee434aa89197f06f30fef02be83c006a5.zip |
FS-Cache: Uninline fscache_object_init()
Uninline fscache_object_init() so as not to expose some of the FS-Cache
internals to the cache backend.
Signed-off-by: David Howells <dhowells@redhat.com>
Tested-By: Milosz Tanski <milosz@adfin.com>
Acked-by: Jeff Layton <jlayton@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fscache-cache.h | 38 |
1 files changed, 2 insertions, 36 deletions
diff --git a/include/linux/fscache-cache.h b/include/linux/fscache-cache.h index 5dfa0aa216b6..9b9c1de4a460 100644 --- a/include/linux/fscache-cache.h +++ b/include/linux/fscache-cache.h @@ -426,42 +426,8 @@ extern const char *fscache_object_states[]; (test_bit(FSCACHE_IOERROR, &(obj)->cache->flags) && \ (obj)->state >= FSCACHE_OBJECT_DYING) -extern void fscache_object_work_func(struct work_struct *work); - -/** - * fscache_object_init - Initialise a cache object description - * @object: Object description - * - * Initialise a cache object description to its basic values. - * - * See Documentation/filesystems/caching/backend-api.txt for a complete - * description. - */ -static inline -void fscache_object_init(struct fscache_object *object, - struct fscache_cookie *cookie, - struct fscache_cache *cache) -{ - atomic_inc(&cache->object_count); - - object->state = FSCACHE_OBJECT_INIT; - spin_lock_init(&object->lock); - INIT_LIST_HEAD(&object->cache_link); - INIT_HLIST_NODE(&object->cookie_link); - INIT_WORK(&object->work, fscache_object_work_func); - INIT_LIST_HEAD(&object->dependents); - INIT_LIST_HEAD(&object->dep_link); - INIT_LIST_HEAD(&object->pending_ops); - object->n_children = 0; - object->n_ops = object->n_in_progress = object->n_exclusive = 0; - object->events = object->event_mask = 0; - object->flags = 0; - object->store_limit = 0; - object->store_limit_l = 0; - object->cache = cache; - object->cookie = cookie; - object->parent = NULL; -} +extern void fscache_object_init(struct fscache_object *, struct fscache_cookie *, + struct fscache_cache *); extern void fscache_object_lookup_negative(struct fscache_object *object); extern void fscache_obtained_object(struct fscache_object *object); |