Lines Matching refs:xas
376 XA_STATE(xas, &lru->xa, 0); in memcg_destroy_list_lru()
382 xas_lock_irq(&xas); in memcg_destroy_list_lru()
383 xas_for_each(&xas, mlru, ULONG_MAX) { in memcg_destroy_list_lru()
385 xas_store(&xas, NULL); in memcg_destroy_list_lru()
387 xas_unlock_irq(&xas); in memcg_destroy_list_lru()
481 XA_STATE(xas, &lru->xa, 0); in memcg_list_lru_alloc()
510 xas_lock_irqsave(&xas, flags); in memcg_list_lru_alloc()
515 xas_set(&xas, index); in memcg_list_lru_alloc()
517 if (unlikely(index < 0 || xas_error(&xas) || xas_load(&xas))) { in memcg_list_lru_alloc()
520 xas_store(&xas, mlru); in memcg_list_lru_alloc()
521 if (xas_error(&xas) == -ENOMEM) { in memcg_list_lru_alloc()
522 xas_unlock_irqrestore(&xas, flags); in memcg_list_lru_alloc()
523 if (xas_nomem(&xas, gfp)) in memcg_list_lru_alloc()
524 xas_set_err(&xas, 0); in memcg_list_lru_alloc()
525 xas_lock_irqsave(&xas, flags); in memcg_list_lru_alloc()
534 xas_set_err(&xas, 0); in memcg_list_lru_alloc()
535 else if (!xas_error(&xas) && index != xas.xa_index) in memcg_list_lru_alloc()
536 xas_set(&xas, index); in memcg_list_lru_alloc()
542 if (xas.xa_alloc) in memcg_list_lru_alloc()
543 xas_nomem(&xas, gfp); in memcg_list_lru_alloc()
544 xas_unlock_irqrestore(&xas, flags); in memcg_list_lru_alloc()
547 return xas_error(&xas); in memcg_list_lru_alloc()