Lines Matching refs:cookie

26 	struct fscache_cookie *cookie = fscache_cres_cookie(cres);
30 if (!fscache_cache_is_live(cookie->volume->cache)) {
35 state = fscache_cookie_state(cookie);
36 _enter("c=%08x{%u},%x", cookie->debug_id, state, want_state);
46 wait_var_event(&cookie->state,
47 fscache_cookie_state(cookie) != state);
61 return cookie->volume->cache->ops->begin_operation(cres, want_state);
72 struct fscache_cookie *cookie,
81 cres->cache_priv = cookie;
83 cres->debug_id = cookie->debug_id;
84 cres->inval_counter = cookie->inval_counter;
86 if (!fscache_begin_cookie_access(cookie, why)) {
92 spin_lock(&cookie->lock);
94 state = fscache_cookie_state(cookie);
95 _enter("c=%08x{%u},%x", cookie->debug_id, state, want_state);
110 WARN(1, "Can't use cookie in state %u\n", cookie->state);
117 spin_unlock(&cookie->lock);
118 if (!cookie->volume->cache->ops->begin_operation(cres, want_state))
123 spin_unlock(&cookie->lock);
124 trace_fscache_access(cookie->debug_id, refcount_read(&cookie->ref),
125 atomic_read(&cookie->n_accesses),
127 timeo = wait_var_event_timeout(&cookie->state,
128 fscache_cookie_state(cookie) != state, 20 * HZ);
130 pr_warn("%s: cookie state change wait timed out: cookie->state=%u state=%u",
131 __func__, fscache_cookie_state(cookie), state);
132 fscache_print_cookie(cookie, 'O');
138 spin_unlock(&cookie->lock);
142 fscache_end_cookie_access(cookie, fscache_access_io_not_live);
148 struct fscache_cookie *cookie)
150 return fscache_begin_operation(cres, cookie, FSCACHE_WANT_PARAMS,
156 struct fscache_cookie *cookie)
158 return fscache_begin_operation(cres, cookie, FSCACHE_WANT_PARAMS,
210 void __fscache_write_to_cache(struct fscache_cookie *cookie,
238 if (fscache_begin_operation(cres, cookie, FSCACHE_WANT_WRITE,
269 void __fscache_resize_cookie(struct fscache_cookie *cookie, loff_t new_size)
273 trace_fscache_resize(cookie, new_size);
274 if (fscache_begin_operation(&cres, cookie, FSCACHE_WANT_WRITE,
277 set_bit(FSCACHE_COOKIE_NEEDS_UPDATE, &cookie->flags);
283 cookie->volume->cache->ops->resize_cookie(&cres, new_size);