diff options
author | Christoph Lameter <cl@linux.com> | 2012-09-05 00:20:33 +0000 |
---|---|---|
committer | Pekka Enberg <penberg@kernel.org> | 2012-09-05 12:00:35 +0300 |
commit | 686d550d222e8f83f6e709debbedf9d8ef77aec7 (patch) | |
tree | eb1a33c0a401c7fd9c22464a88c3c87fbfc8808d /mm/slob.c | |
parent | 208c4358dc4a8f0fe99e49eb8d21a869b01e7d34 (diff) |
mm/slab_common: Improve error handling in kmem_cache_create
Instead of using s == NULL use an errorcode. This allows much more
detailed diagnostics as to what went wrong. As we add more functionality
from the slab allocators to the common kmem_cache_create() function we will
also add more error conditions.
Print the error code during the panic as well as in a warning if the module
can handle failure. The API for kmem_cache_create() currently does not allow
the returning of an error code. Return NULL but log the cause of the problem
in the syslog.
Reviewed-by: Glauber Costa <glommer@parallels.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'mm/slob.c')
0 files changed, 0 insertions, 0 deletions