aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fscache-cache.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2013-05-10 14:50:25 -0400
committerDavid Howells <dhowells@redhat.com>2013-06-19 09:16:47 -0400
commit610be24ee434aa89197f06f30fef02be83c006a5 (patch)
treed9bf801f4e81c4cee1dc20fa444e0a3d17c6372a /include/linux/fscache-cache.h
parent0c59a95d90081e5d840649d4f872027123e3420c (diff)
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/linux/fscache-cache.h')
-rw-r--r--include/linux/fscache-cache.h38
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[];
426 (test_bit(FSCACHE_IOERROR, &(obj)->cache->flags) && \ 426 (test_bit(FSCACHE_IOERROR, &(obj)->cache->flags) && \
427 (obj)->state >= FSCACHE_OBJECT_DYING) 427 (obj)->state >= FSCACHE_OBJECT_DYING)
428 428
429extern void fscache_object_work_func(struct work_struct *work); 429extern void fscache_object_init(struct fscache_object *, struct fscache_cookie *,
430 430 struct fscache_cache *);
431/**
432 * fscache_object_init - Initialise a cache object description
433 * @object: Object description
434 *
435 * Initialise a cache object description to its basic values.
436 *
437 * See Documentation/filesystems/caching/backend-api.txt for a complete
438 * description.
439 */
440static inline
441void fscache_object_init(struct fscache_object *object,
442 struct fscache_cookie *cookie,
443 struct fscache_cache *cache)
444{
445 atomic_inc(&cache->object_count);
446
447 object->state = FSCACHE_OBJECT_INIT;
448 spin_lock_init(&object->lock);
449 INIT_LIST_HEAD(&object->cache_link);
450 INIT_HLIST_NODE(&object->cookie_link);
451 INIT_WORK(&object->work, fscache_object_work_func);
452 INIT_LIST_HEAD(&object->dependents);
453 INIT_LIST_HEAD(&object->dep_link);
454 INIT_LIST_HEAD(&object->pending_ops);
455 object->n_children = 0;
456 object->n_ops = object->n_in_progress = object->n_exclusive = 0;
457 object->events = object->event_mask = 0;
458 object->flags = 0;
459 object->store_limit = 0;
460 object->store_limit_l = 0;
461 object->cache = cache;
462 object->cookie = cookie;
463 object->parent = NULL;
464}
465 431
466extern void fscache_object_lookup_negative(struct fscache_object *object); 432extern void fscache_object_lookup_negative(struct fscache_object *object);
467extern void fscache_obtained_object(struct fscache_object *object); 433extern void fscache_obtained_object(struct fscache_object *object);