···381381 * It's time to move the inline table to an external382382 * page and begin to build the xtree383383 */384384- if (DQUOT_ALLOC_BLOCK(ip, sbi->nbperpage) ||385385- dbAlloc(ip, 0, sbi->nbperpage, &xaddr))386386- goto clean_up; /* No space */384384+ if (DQUOT_ALLOC_BLOCK(ip, sbi->nbperpage))385385+ goto clean_up;386386+ if (dbAlloc(ip, 0, sbi->nbperpage, &xaddr)) {387387+ DQUOT_FREE_BLOCK(ip, sbi->nbperpage);388388+ goto clean_up;389389+ }387390388391 /*389392 * Save the table, we're going to overwrite it with the···400397 xtInitRoot(tid, ip);401398402399 /*403403- * Allocate the first block & add it to the xtree400400+ * Add the first block to the xtree404401 */405402 if (xtInsert(tid, ip, 0, 0, sbi->nbperpage, &xaddr, 0)) {406403 /* This really shouldn't fail */407404 jfs_warn("add_index: xtInsert failed!");408405 memcpy(&jfs_ip->i_dirtable, temp_table,409406 sizeof (temp_table));407407+ dbFree(ip, xaddr, sbi->nbperpage);408408+ DQUOT_FREE_BLOCK(ip, sbi->nbperpage);410409 goto clean_up;411410 }412411 ip->i_size = PSIZE;