* Find a slab within a hash table. This is used for OFFPAGE zones to lookup * the slab structure. * * Arguments: * hash The hash table to search. * data The base page of the item. * * Returns: * A pointer to a slab if successful, else NULL. */
| 601 | * A pointer to a slab if successful, else NULL. |
| 602 | */ |
| 603 | static __inline uma_slab_t |
| 604 | hash_sfind(struct uma_hash *hash, uint8_t *data) |
| 605 | { |
| 606 | uma_hash_slab_t slab; |
| 607 | u_int hval; |
| 608 | |
| 609 | hval = UMA_HASH(hash, data); |
| 610 | |
| 611 | LIST_FOREACH(slab, &hash->uh_slab_hash[hval], uhs_hlink) { |
| 612 | if ((uint8_t *)slab->uhs_data == data) |
| 613 | return (&slab->uhs_slab); |
| 614 | } |
| 615 | return (NULL); |
| 616 | } |
| 617 | |
| 618 | #ifndef FSTACK |
| 619 | static __inline uma_slab_t |
no outgoing calls
no test coverage detected