aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fscache/internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/fscache/internal.h')
-rw-r--r--fs/fscache/internal.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/fs/fscache/internal.h b/fs/fscache/internal.h
index 16389942a54e..529f4de328c2 100644
--- a/fs/fscache/internal.h
+++ b/fs/fscache/internal.h
@@ -86,6 +86,18 @@ extern int fscache_wait_bit(void *);
86extern int fscache_wait_bit_interruptible(void *); 86extern int fscache_wait_bit_interruptible(void *);
87 87
88/* 88/*
89 * fsc-object.c
90 */
91extern void fscache_withdrawing_object(struct fscache_cache *,
92 struct fscache_object *);
93extern void fscache_enqueue_object(struct fscache_object *);
94
95/*
96 * fsc-operation.c
97 */
98#define fscache_start_operations(obj) BUG()
99
100/*
89 * fsc-proc.c 101 * fsc-proc.c
90 */ 102 */
91#ifdef CONFIG_PROC_FS 103#ifdef CONFIG_PROC_FS
@@ -196,7 +208,19 @@ extern const struct file_operations fscache_stats_fops;
196static inline void fscache_raise_event(struct fscache_object *object, 208static inline void fscache_raise_event(struct fscache_object *object,
197 unsigned event) 209 unsigned event)
198{ 210{
199 BUG(); // TODO 211 if (!test_and_set_bit(event, &object->events) &&
212 test_bit(event, &object->event_mask))
213 fscache_enqueue_object(object);
214}
215
216/*
217 * drop a reference to a cookie
218 */
219static inline void fscache_cookie_put(struct fscache_cookie *cookie)
220{
221 BUG_ON(atomic_read(&cookie->usage) <= 0);
222 if (atomic_dec_and_test(&cookie->usage))
223 __fscache_cookie_put(cookie);
200} 224}
201 225
202/*****************************************************************************/ 226/*****************************************************************************/