Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a920e941 authored by Johann Lombardi's avatar Johann Lombardi Committed by Linus Torvalds
Browse files

[PATCH] jbd2: rename slab



jbd and jbd2 currently use the same slab names which must be unique.  The
patch below just renames jbd2's slabs.

Signed-off-by: default avatarJohann Lombardi <johann.lombardi@bull.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent f7f4bccb
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -1631,7 +1631,7 @@ void * __jbd2_kmalloc (const char *where, size_t size, gfp_t flags, int retry)


static kmem_cache_t *jbd_slab[JBD_MAX_SLABS];
static kmem_cache_t *jbd_slab[JBD_MAX_SLABS];
static const char *jbd_slab_names[JBD_MAX_SLABS] = {
static const char *jbd_slab_names[JBD_MAX_SLABS] = {
	"jbd_1k", "jbd_2k", "jbd_4k", NULL, "jbd_8k"
	"jbd2_1k", "jbd2_2k", "jbd2_4k", NULL, "jbd2_8k"
};
};


static void jbd2_journal_destroy_jbd_slabs(void)
static void jbd2_journal_destroy_jbd_slabs(void)
@@ -1702,7 +1702,7 @@ static int journal_init_jbd2_journal_head_cache(void)
	int retval;
	int retval;


	J_ASSERT(jbd2_journal_head_cache == 0);
	J_ASSERT(jbd2_journal_head_cache == 0);
	jbd2_journal_head_cache = kmem_cache_create("journal_head",
	jbd2_journal_head_cache = kmem_cache_create("jbd2_journal_head",
				sizeof(struct journal_head),
				sizeof(struct journal_head),
				0,		/* offset */
				0,		/* offset */
				0,		/* flags */
				0,		/* flags */
@@ -1999,7 +1999,7 @@ kmem_cache_t *jbd2_handle_cache;


static int __init journal_init_handle_cache(void)
static int __init journal_init_handle_cache(void)
{
{
	jbd2_handle_cache = kmem_cache_create("journal_handle",
	jbd2_handle_cache = kmem_cache_create("jbd2_journal_handle",
				sizeof(handle_t),
				sizeof(handle_t),
				0,		/* offset */
				0,		/* offset */
				0,		/* flags */
				0,		/* flags */
+2 −2
Original line number Original line Diff line number Diff line
@@ -168,13 +168,13 @@ static struct jbd2_revoke_record_s *find_revoke_record(journal_t *journal,


int __init jbd2_journal_init_revoke_caches(void)
int __init jbd2_journal_init_revoke_caches(void)
{
{
	jbd2_revoke_record_cache = kmem_cache_create("revoke_record",
	jbd2_revoke_record_cache = kmem_cache_create("jbd2_revoke_record",
					   sizeof(struct jbd2_revoke_record_s),
					   sizeof(struct jbd2_revoke_record_s),
					   0, SLAB_HWCACHE_ALIGN, NULL, NULL);
					   0, SLAB_HWCACHE_ALIGN, NULL, NULL);
	if (jbd2_revoke_record_cache == 0)
	if (jbd2_revoke_record_cache == 0)
		return -ENOMEM;
		return -ENOMEM;


	jbd2_revoke_table_cache = kmem_cache_create("revoke_table",
	jbd2_revoke_table_cache = kmem_cache_create("jbd2_revoke_table",
					   sizeof(struct jbd2_revoke_table_s),
					   sizeof(struct jbd2_revoke_table_s),
					   0, 0, NULL, NULL);
					   0, 0, NULL, NULL);
	if (jbd2_revoke_table_cache == 0) {
	if (jbd2_revoke_table_cache == 0) {