JBD: JBD slab allocation cleanups
JBD: Replace slab allocations with page allocations JBD allocate memory for committed_data and frozen_data from slab. However JBD should not pass slab pages down to the block layer. Use page allocator pages instead. This will also prepare JBD for the large blocksize patchset. Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Mingming Cao <cmm@us.ibm.com>
This commit is contained in:
parent
d85714d81c
commit
c089d490df
4 changed files with 21 additions and 94 deletions
|
@ -375,7 +375,7 @@ void journal_commit_transaction(journal_t *journal)
|
|||
struct buffer_head *bh = jh2bh(jh);
|
||||
|
||||
jbd_lock_bh_state(bh);
|
||||
jbd_slab_free(jh->b_committed_data, bh->b_size);
|
||||
jbd_free(jh->b_committed_data, bh->b_size);
|
||||
jh->b_committed_data = NULL;
|
||||
jbd_unlock_bh_state(bh);
|
||||
}
|
||||
|
@ -792,14 +792,14 @@ restart_loop:
|
|||
* Otherwise, we can just throw away the frozen data now.
|
||||
*/
|
||||
if (jh->b_committed_data) {
|
||||
jbd_slab_free(jh->b_committed_data, bh->b_size);
|
||||
jbd_free(jh->b_committed_data, bh->b_size);
|
||||
jh->b_committed_data = NULL;
|
||||
if (jh->b_frozen_data) {
|
||||
jh->b_committed_data = jh->b_frozen_data;
|
||||
jh->b_frozen_data = NULL;
|
||||
}
|
||||
} else if (jh->b_frozen_data) {
|
||||
jbd_slab_free(jh->b_frozen_data, bh->b_size);
|
||||
jbd_free(jh->b_frozen_data, bh->b_size);
|
||||
jh->b_frozen_data = NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue