mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 19:47:08 +02:00
Merge 7302e91f39 ("mm/slab_common: use WARN() if cache still has objects on destroy") into android-mainline
Steps on the way to 5.17-rc1 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Ibf6aeaa6786612e2964fbbaa5adf5e4966d868ec
This commit is contained in:
commit
6e4ec1bf0e
|
|
@ -489,8 +489,6 @@ void slab_kmem_cache_release(struct kmem_cache *s)
|
|||
|
||||
void kmem_cache_destroy(struct kmem_cache *s)
|
||||
{
|
||||
int err;
|
||||
|
||||
if (unlikely(!s))
|
||||
return;
|
||||
|
||||
|
|
@ -501,12 +499,9 @@ void kmem_cache_destroy(struct kmem_cache *s)
|
|||
if (s->refcount)
|
||||
goto out_unlock;
|
||||
|
||||
err = shutdown_cache(s);
|
||||
if (err) {
|
||||
pr_err("%s %s: Slab cache still has objects\n",
|
||||
__func__, s->name);
|
||||
dump_stack();
|
||||
}
|
||||
WARN(shutdown_cache(s),
|
||||
"%s %s: Slab cache still has objects when called from %pS",
|
||||
__func__, s->name, (void *)_RET_IP_);
|
||||
out_unlock:
|
||||
mutex_unlock(&slab_mutex);
|
||||
cpus_read_unlock();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user