#define FSCACHE_DEBUG_LEVEL …
#include <linux/module.h>
#include <linux/slab.h>
#include "internal.h"
struct kmem_cache *fscache_cookie_jar;
static void fscache_cookie_lru_timed_out(struct timer_list *timer);
static void fscache_cookie_lru_worker(struct work_struct *work);
static void fscache_cookie_worker(struct work_struct *work);
static void fscache_unhash_cookie(struct fscache_cookie *cookie);
static void fscache_perform_invalidation(struct fscache_cookie *cookie);
#define fscache_cookie_hash_shift …
static struct hlist_bl_head fscache_cookie_hash[1 << fscache_cookie_hash_shift];
static LIST_HEAD(fscache_cookies);
static DEFINE_RWLOCK(fscache_cookies_lock);
static LIST_HEAD(fscache_cookie_lru);
static DEFINE_SPINLOCK(fscache_cookie_lru_lock);
DEFINE_TIMER(fscache_cookie_lru_timer, fscache_cookie_lru_timed_out);
static DECLARE_WORK(fscache_cookie_lru_work, fscache_cookie_lru_worker);
static const char fscache_cookie_states[FSCACHE_COOKIE_STATE__NR] = …;
static unsigned int fscache_lru_cookie_timeout = …;
void fscache_print_cookie(struct fscache_cookie *cookie, char prefix)
{ … }
static void fscache_free_cookie(struct fscache_cookie *cookie)
{ … }
static void __fscache_queue_cookie(struct fscache_cookie *cookie)
{ … }
static void fscache_queue_cookie(struct fscache_cookie *cookie,
enum fscache_cookie_trace where)
{ … }
static void fscache_init_access_gate(struct fscache_cookie *cookie)
{ … }
void fscache_end_cookie_access(struct fscache_cookie *cookie,
enum fscache_access_trace why)
{ … }
EXPORT_SYMBOL(…);
static void __fscache_begin_cookie_access(struct fscache_cookie *cookie,
enum fscache_access_trace why)
{ … }
bool fscache_begin_cookie_access(struct fscache_cookie *cookie,
enum fscache_access_trace why)
{ … }
static inline void wake_up_cookie_state(struct fscache_cookie *cookie)
{ … }
static void __fscache_set_cookie_state(struct fscache_cookie *cookie,
enum fscache_cookie_state state)
{ … }
static void fscache_set_cookie_state(struct fscache_cookie *cookie,
enum fscache_cookie_state state)
{ … }
void fscache_cookie_lookup_negative(struct fscache_cookie *cookie)
{ … }
EXPORT_SYMBOL(…);
void fscache_resume_after_invalidation(struct fscache_cookie *cookie)
{ … }
EXPORT_SYMBOL(…);
void fscache_caching_failed(struct fscache_cookie *cookie)
{ … }
EXPORT_SYMBOL(…);
static int fscache_set_key(struct fscache_cookie *cookie,
const void *index_key, size_t index_key_len)
{ … }
static bool fscache_cookie_same(const struct fscache_cookie *a,
const struct fscache_cookie *b)
{ … }
static atomic_t fscache_cookie_debug_id = …;
static struct fscache_cookie *fscache_alloc_cookie(
struct fscache_volume *volume,
u8 advice,
const void *index_key, size_t index_key_len,
const void *aux_data, size_t aux_data_len,
loff_t object_size)
{ … }
static inline bool fscache_cookie_is_dropped(struct fscache_cookie *cookie)
{ … }
static void fscache_wait_on_collision(struct fscache_cookie *candidate,
struct fscache_cookie *wait_for)
{ … }
static bool fscache_hash_cookie(struct fscache_cookie *candidate)
{ … }
struct fscache_cookie *__fscache_acquire_cookie(
struct fscache_volume *volume,
u8 advice,
const void *index_key, size_t index_key_len,
const void *aux_data, size_t aux_data_len,
loff_t object_size)
{ … }
EXPORT_SYMBOL(…);
static void fscache_prepare_to_write(struct fscache_cookie *cookie)
{ … }
static void fscache_perform_lookup(struct fscache_cookie *cookie)
{ … }
static bool fscache_begin_lookup(struct fscache_cookie *cookie, bool will_modify)
{ … }
void __fscache_use_cookie(struct fscache_cookie *cookie, bool will_modify)
{ … }
EXPORT_SYMBOL(…);
static void fscache_unuse_cookie_locked(struct fscache_cookie *cookie)
{ … }
void __fscache_unuse_cookie(struct fscache_cookie *cookie,
const void *aux_data, const loff_t *object_size)
{ … }
EXPORT_SYMBOL(…);
static void fscache_cookie_state_machine(struct fscache_cookie *cookie)
{ … }
static void fscache_cookie_worker(struct work_struct *work)
{ … }
static void __fscache_withdraw_cookie(struct fscache_cookie *cookie)
{ … }
static void fscache_cookie_lru_do_one(struct fscache_cookie *cookie)
{ … }
static void fscache_cookie_lru_worker(struct work_struct *work)
{ … }
static void fscache_cookie_lru_timed_out(struct timer_list *timer)
{ … }
static void fscache_cookie_drop_from_lru(struct fscache_cookie *cookie)
{ … }
static void fscache_unhash_cookie(struct fscache_cookie *cookie)
{ … }
static void fscache_drop_withdraw_cookie(struct fscache_cookie *cookie)
{ … }
void fscache_withdraw_cookie(struct fscache_cookie *cookie)
{ … }
EXPORT_SYMBOL(…);
void __fscache_relinquish_cookie(struct fscache_cookie *cookie, bool retire)
{ … }
EXPORT_SYMBOL(…);
void fscache_put_cookie(struct fscache_cookie *cookie,
enum fscache_cookie_trace where)
{ … }
EXPORT_SYMBOL(…);
struct fscache_cookie *fscache_get_cookie(struct fscache_cookie *cookie,
enum fscache_cookie_trace where)
{ … }
EXPORT_SYMBOL(…);
static void fscache_perform_invalidation(struct fscache_cookie *cookie)
{ … }
void __fscache_invalidate(struct fscache_cookie *cookie,
const void *aux_data, loff_t new_size,
unsigned int flags)
{ … }
EXPORT_SYMBOL(…);
#ifdef CONFIG_PROC_FS
static int fscache_cookies_seq_show(struct seq_file *m, void *v)
{ … }
static void *fscache_cookies_seq_start(struct seq_file *m, loff_t *_pos)
__acquires(fscache_cookies_lock)
{ … }
static void *fscache_cookies_seq_next(struct seq_file *m, void *v, loff_t *_pos)
{ … }
static void fscache_cookies_seq_stop(struct seq_file *m, void *v)
__releases(rcu)
{ … }
const struct seq_operations fscache_cookies_seq_ops = …;
#endif