2012/5/19 Christoph Lameter <cl@xxxxxxxxx>: > Move the mutex handling into the common kmem_cache_create() > function. > > list_add(&s->list, &slab_caches); > mutex_unlock(&slab_mutex); > - if (sysfs_slab_add(s)) { > - mutex_lock(&slab_mutex); > - list_del(&s->list); > - kfree(n); > - kfree(s); > - goto err; > - } > - return s; > + r = sysfs_slab_add(s); > + mutex_lock(&slab_mutex); > + > + if (!r) > + return s; > + > + list_del(&s->list); > + kmem_cache_close(s); > } > - kfree(n); > kfree(s); > } Before this patch is applied, can we move calling 'sysfs_slab_add' to common code for removing slab_mutex entirely in kmem_cache_create? ÿôèº{.nÇ+?·ÿ±éÝjg¬±¨Â+aþéì¹»®&Þ?)îÇù¦þ)í?æèw+h?¨èÚ&£ù/iÉÿ¢¸ÿ?梷¢?ú(?¸§»þÇ?þm§ÿÿÃÿ?)îÇù¦þ?àÿñb?n?ö¢®×¥yÊ&?{^®wr«?ë"?&§iÖÿ²('?Ûiÿÿì¶?m?é?µêÿq¯Ã¢ízf¢?ÿÚ?·??ÚÿýÚ'·ù/iÉÿ¢¸ÿýé??_佧$þ?àÿöÿ