diff options
| author | Maxime Ripard <maxime@cerno.tech> | 2023-01-03 08:32:12 +0100 |
|---|---|---|
| committer | Maxime Ripard <maxime@cerno.tech> | 2023-01-03 08:32:12 +0100 |
| commit | 2c55d703391acf7e9101da596d0c15ee03b318a3 (patch) | |
| tree | 422ef671343624b56d333b47d20a538eeedbfe10 /include/linux/mempool.h | |
| parent | 92d43bd3bc9728c1fb114d7011d46f5ea9489e28 (diff) | |
| parent | 88603b6dc419445847923fcb7fe5080067a30f98 (diff) | |
Merge drm/drm-fixes into drm-misc-fixes
Let's start the fixes cycle.
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Diffstat (limited to 'include/linux/mempool.h')
| -rw-r--r-- | include/linux/mempool.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/mempool.h b/include/linux/mempool.h index 0c964ac107c2..4aae6c06c5f2 100644 --- a/include/linux/mempool.h +++ b/include/linux/mempool.h @@ -30,6 +30,11 @@ static inline bool mempool_initialized(mempool_t *pool) return pool->elements != NULL; } +static inline bool mempool_is_saturated(mempool_t *pool) +{ + return READ_ONCE(pool->curr_nr) >= pool->min_nr; +} + void mempool_exit(mempool_t *pool); int mempool_init_node(mempool_t *pool, int min_nr, mempool_alloc_t *alloc_fn, mempool_free_t *free_fn, void *pool_data, |
