Lines Matching refs:cookie
25 #define fscache_cookie_valid(cookie) (cookie) argument
27 #define fscache_cookie_enabled(cookie) (cookie && !test_bit(FSCACHE_COOKIE_DISABLED, &cookie->flags… argument
32 #define fscache_cookie_valid(cookie) (0) argument
34 #define fscache_cookie_enabled(cookie) (0) argument
175 void __fscache_write_to_cache(struct fscache_cookie *cookie,
271 static inline void fscache_use_cookie(struct fscache_cookie *cookie, in fscache_use_cookie() argument
274 if (fscache_cookie_valid(cookie)) in fscache_use_cookie()
275 __fscache_use_cookie(cookie, will_modify); in fscache_use_cookie()
287 static inline void fscache_unuse_cookie(struct fscache_cookie *cookie, in fscache_unuse_cookie() argument
291 if (fscache_cookie_valid(cookie)) in fscache_unuse_cookie()
292 __fscache_unuse_cookie(cookie, aux_data, object_size); in fscache_unuse_cookie()
308 void fscache_relinquish_cookie(struct fscache_cookie *cookie, bool retire) in fscache_relinquish_cookie() argument
310 if (fscache_cookie_valid(cookie)) in fscache_relinquish_cookie()
311 __fscache_relinquish_cookie(cookie, retire); in fscache_relinquish_cookie()
317 static inline void *fscache_get_aux(struct fscache_cookie *cookie) in fscache_get_aux() argument
319 if (cookie->aux_len <= sizeof(cookie->inline_aux)) in fscache_get_aux()
320 return cookie->inline_aux; in fscache_get_aux()
322 return cookie->aux; in fscache_get_aux()
329 void fscache_update_aux(struct fscache_cookie *cookie, in fscache_update_aux() argument
332 void *p = fscache_get_aux(cookie); in fscache_update_aux()
335 memcpy(p, aux_data, cookie->aux_len); in fscache_update_aux()
337 cookie->object_size = *object_size; in fscache_update_aux()
345 void __fscache_update_cookie(struct fscache_cookie *cookie, const void *aux_data, in __fscache_update_cookie() argument
351 fscache_update_aux(cookie, aux_data, object_size); in __fscache_update_cookie()
353 set_bit(FSCACHE_COOKIE_NEEDS_UPDATE, &cookie->flags); in __fscache_update_cookie()
371 void fscache_update_cookie(struct fscache_cookie *cookie, const void *aux_data, in fscache_update_cookie() argument
374 if (fscache_cookie_enabled(cookie)) in fscache_update_cookie()
375 __fscache_update_cookie(cookie, aux_data, object_size); in fscache_update_cookie()
389 void fscache_resize_cookie(struct fscache_cookie *cookie, loff_t new_size) in fscache_resize_cookie() argument
391 if (fscache_cookie_enabled(cookie)) in fscache_resize_cookie()
392 __fscache_resize_cookie(cookie, new_size); in fscache_resize_cookie()
415 void fscache_invalidate(struct fscache_cookie *cookie, in fscache_invalidate() argument
418 if (fscache_cookie_enabled(cookie)) in fscache_invalidate()
419 __fscache_invalidate(cookie, aux_data, size, flags); in fscache_invalidate()
454 struct fscache_cookie *cookie) in fscache_begin_read_operation() argument
456 if (fscache_cookie_enabled(cookie)) in fscache_begin_read_operation()
457 return __fscache_begin_read_operation(cres, cookie); in fscache_begin_read_operation()
539 struct fscache_cookie *cookie) in fscache_begin_write_operation() argument
541 if (fscache_cookie_enabled(cookie)) in fscache_begin_write_operation()
542 return __fscache_begin_write_operation(cres, cookie); in fscache_begin_write_operation()
619 static inline void fscache_write_to_cache(struct fscache_cookie *cookie, in fscache_write_to_cache() argument
627 __fscache_write_to_cache(cookie, mapping, start, len, i_size, in fscache_write_to_cache()
643 void fscache_note_page_release(struct fscache_cookie *cookie) in fscache_note_page_release() argument
650 if (cookie && in fscache_note_page_release()
651 test_bit(FSCACHE_COOKIE_HAVE_DATA, &cookie->flags) && in fscache_note_page_release()
652 test_bit(FSCACHE_COOKIE_NO_DATA_TO_READ, &cookie->flags)) in fscache_note_page_release()
653 clear_bit(FSCACHE_COOKIE_NO_DATA_TO_READ, &cookie->flags); in fscache_note_page_release()