Lines Matching refs:cookie
293 * @cookie: Cookie object will be attached to
302 struct fscache_cookie *cookie,
325 object->cookie = cookie;
326 fscache_cookie_get(cookie, fscache_cookie_get_attach_object);
454 struct fscache_cookie *cookie = object->cookie;
477 cookie->def->name, object->cache->tag->name);
504 * fscache_object_lookup_negative - Note negative cookie lookup
505 * @object: Object pointing to cookie to mark
512 struct fscache_cookie *cookie = object->cookie;
522 set_bit(FSCACHE_COOKIE_NO_DATA_YET, &cookie->flags);
523 clear_bit(FSCACHE_COOKIE_UNAVAILABLE, &cookie->flags);
525 _debug("wake up lookup %p", &cookie->flags);
526 clear_bit_unlock(FSCACHE_COOKIE_LOOKING_UP, &cookie->flags);
527 wake_up_bit(&cookie->flags, FSCACHE_COOKIE_LOOKING_UP);
535 * @object: Object pointing to cookie to mark
540 * Note that after calling this, an object's cookie may be relinquished by the
545 struct fscache_cookie *cookie = object->cookie;
555 clear_bit_unlock(FSCACHE_COOKIE_NO_DATA_YET, &cookie->flags);
556 clear_bit(FSCACHE_COOKIE_UNAVAILABLE, &cookie->flags);
561 clear_bit_unlock(FSCACHE_COOKIE_LOOKING_UP, &cookie->flags);
562 wake_up_bit(&cookie->flags, FSCACHE_COOKIE_LOOKING_UP);
625 struct fscache_cookie *cookie;
637 cookie = object->cookie;
638 set_bit(FSCACHE_COOKIE_UNAVAILABLE, &cookie->flags);
639 if (test_and_clear_bit(FSCACHE_COOKIE_LOOKING_UP, &cookie->flags))
640 wake_up_bit(&cookie->flags, FSCACHE_COOKIE_LOOKING_UP);
703 struct fscache_cookie *cookie = object->cookie;
709 ASSERT(cookie != NULL);
712 if (test_bit(FSCACHE_COOKIE_AUX_UPDATED, &cookie->flags)) {
717 /* Make sure the cookie no longer points here and that the netfs isn't
720 spin_lock(&cookie->lock);
722 if (hlist_empty(&cookie->backing_objects) &&
723 test_and_clear_bit(FSCACHE_COOKIE_INVALIDATING, &cookie->flags))
725 spin_unlock(&cookie->lock);
728 wake_up_bit(&cookie->flags, FSCACHE_COOKIE_INVALIDATING);
729 if (test_and_clear_bit(FSCACHE_COOKIE_LOOKING_UP, &cookie->flags))
730 wake_up_bit(&cookie->flags, FSCACHE_COOKIE_LOOKING_UP);
804 /* We can get rid of the cookie now */
805 fscache_cookie_put(object->cookie, fscache_cookie_put_object);
806 object->cookie = NULL;
920 * The caller must be holding a ref on cookie->n_active (held by
930 if (!object->cookie->def->check_aux) {
935 result = object->cookie->def->check_aux(object->cookie->netfs_data,
968 struct fscache_cookie *cookie = object->cookie;
972 /* We're going to need the cookie. If the cookie is not available then
976 ASSERT(radix_tree_empty(&object->cookie->stores));
978 _leave(" [no cookie]");
983 fscache_invalidate_writes(cookie);
992 fscache_operation_init(cookie, op, object->cache->ops->invalidate_object,
997 trace_fscache_page_op(cookie, NULL, op, fscache_page_op_invalidate);
999 spin_lock(&cookie->lock);
1002 spin_unlock(&cookie->lock);
1009 set_bit(FSCACHE_COOKIE_NO_DATA_YET, &cookie->flags);
1014 if (test_and_clear_bit(FSCACHE_COOKIE_INVALIDATING, &cookie->flags))
1015 wake_up_bit(&cookie->flags, FSCACHE_COOKIE_INVALIDATING);
1027 spin_unlock(&cookie->lock);