From: Christoph Lameter Date: Wed, 5 Sep 2012 00:20:33 +0000 (+0000) Subject: mm/slab_common: Improve error handling in kmem_cache_create X-Git-Tag: omap-for-v3.7-rc1/fixes-cpufreq-signed~8^2~1^2~14 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=686d550d222e8f83f6e709debbedf9d8ef77aec7;p=pandora-kernel.git 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 Acked-by: David Rientjes Signed-off-by: Christoph Lameter Signed-off-by: Pekka Enberg --- Reading git-diff-tree failed