X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=fs%2Fext4%2Fmigrate.c;h=e7cd488da4bb2dd3ad039db4e5ce01a0fc34c902;hb=0390131ba84fd3f726f9e24fc4553828125700bb;hp=f2a9cf498ecda12ddde2c7fb1a73a40c64767ade;hpb=ed8c3174dd227031d1f3b9fa4fbb512f8f623434;p=deliverable%2Flinux.git diff --git a/fs/ext4/migrate.c b/fs/ext4/migrate.c index f2a9cf498ecd..e7cd488da4bb 100644 --- a/fs/ext4/migrate.c +++ b/fs/ext4/migrate.c @@ -59,7 +59,8 @@ static int finish_range(handle_t *handle, struct inode *inode, /* * Make sure the credit we accumalated is not really high */ - if (needed && handle->h_buffer_credits >= EXT4_RESERVE_TRANS_BLOCKS) { + if (needed && ext4_handle_has_enough_credits(handle, + EXT4_RESERVE_TRANS_BLOCKS)) { retval = ext4_journal_restart(handle, needed); if (retval) goto err_out; @@ -229,7 +230,7 @@ static int extend_credit_for_blkdel(handle_t *handle, struct inode *inode) { int retval = 0, needed; - if (handle->h_buffer_credits > EXT4_RESERVE_TRANS_BLOCKS) + if (ext4_handle_has_enough_credits(handle, EXT4_RESERVE_TRANS_BLOCKS+1)) return 0; /* * We are freeing a blocks. During this we touch