-Index: linux-2.6.18-128.1.6/fs/ext4/mballoc.c
-===================================================================
---- linux-2.6.18-128.1.6.orig/fs/ext4/mballoc.c
-+++ linux-2.6.18-128.1.6/fs/ext4/mballoc.c
+diff -rupN linux-2.6.18-128.1.6_1//fs/ext4/mballoc.c linux-2.6.18-128.1.6_2//fs/ext4/mballoc.c
+--- linux-2.6.18-128.1.6_1//fs/ext4/mballoc.c 2009-09-28 16:38:04.000000000 +0530
++++ linux-2.6.18-128.1.6_2//fs/ext4/mballoc.c 2009-09-28 16:40:35.000000000 +0530
@@ -660,7 +660,7 @@ static void ext4_mb_mark_free_simple(str
}
}
list_del(&pa->pa_group_list);
ext4_mb_release_inode_pa(&e4b, bitmap_bh, pa, ac);
ext4_unlock_group(sb, group);
-Index: linux-2.6.18-128.1.6/fs/ext4/mballoc.h
-===================================================================
---- linux-2.6.18-128.1.6.orig/fs/ext4/mballoc.h
-+++ linux-2.6.18-128.1.6/fs/ext4/mballoc.h
+@@ -4394,6 +4472,7 @@ ext4_mb_discard_lg_preallocations(struct
+ }
+ ext4_lock_group(sb, group);
+ list_del(&pa->pa_group_list);
++ ext4_get_group_info(sb, group)->bb_prealloc_nr--;
+ ext4_mb_release_group_pa(&e4b, pa, ac);
+ ext4_unlock_group(sb, group);
+
+diff -rupN linux-2.6.18-128.1.6_1//fs/ext4/mballoc.h linux-2.6.18-128.1.6_2//fs/ext4/mballoc.h
+--- linux-2.6.18-128.1.6_1//fs/ext4/mballoc.h 2009-09-28 16:38:04.000000000 +0530
++++ linux-2.6.18-128.1.6_2//fs/ext4/mballoc.h 2009-09-28 16:38:43.000000000 +0530
@@ -119,6 +119,7 @@ struct ext4_group_info {
unsigned short bb_free;
unsigned short bb_fragments;
#define FSFILT_SINGLEDATA_TRANS_BLOCKS(sb) EXT3_SINGLEDATA_TRANS_BLOCKS
#endif
-#define fsfilt_ext3_journal_start(inode, nblocks) ext3_journal_start(inode, nblocks)
-#define fsfilt_ext3_journal_stop(handle) ext3_journal_stop(handle)
-
static cfs_mem_cache_t *fcb_cache;
struct fsfilt_cb_data {
journal_start:
LASSERTF(nblocks > 0, "can't start %d credit transaction\n", nblocks);
- handle = fsfilt_ext3_journal_start(inode, nblocks);
+ handle = ext3_journal_start(inode, nblocks);
if (!IS_ERR(handle))
LASSERT(current->journal_info == handle);
}
LASSERTF(needed > 0, "can't start %d credit transaction\n", needed);
- handle = fsfilt_ext3_journal_start(fso->fso_dentry->d_inode, needed);
+ handle = ext3_journal_start(fso->fso_dentry->d_inode, needed);
if (IS_ERR(handle)) {
CERROR("can't get handle for %d credits: rc = %ld\n", needed,
PTR_ERR(handle));
if (force_sync)
handle->h_sync = 1; /* recovery likes this */
- rc = fsfilt_ext3_journal_stop(handle);
+ rc = ext3_journal_stop(handle);
return rc;
}
tid = transaction->t_tid;
/* we don't want to be blocked */
handle->h_sync = 0;
- rc = fsfilt_ext3_journal_stop(handle);
+ rc = ext3_journal_stop(handle);
if (rc) {
CERROR("error while stopping transaction: %d\n", rc);
return rc;
count = ext3_ext_calc_credits_for_insert(base, path);
fsfilt_up_truncate_sem(inode);
- handle = fsfilt_ext3_journal_start(inode, count+EXT3_ALLOC_NEEDED+1);
+ handle = ext3_journal_start(inode, count+EXT3_ALLOC_NEEDED+1);
if (IS_ERR(handle)) {
fsfilt_down_truncate_sem(inode);
return PTR_ERR(handle);
fsfilt_down_truncate_sem(inode);
if (tgen != EXT_GENERATION(base)) {
/* the tree has changed. so path can be invalid at moment */
- fsfilt_ext3_journal_stop(handle);
+ ext3_journal_stop(handle);
return EXT_REPEAT;
}
BUG_ON(le32_to_cpu(nex.ee_block) != cex->ec_block);
out:
- fsfilt_ext3_journal_stop(handle);
+ ext3_journal_stop(handle);
map:
if (err >= 0) {
/* map blocks */
block_count = (*offs & (blocksize - 1)) + bufsize;
block_count = (block_count + blocksize - 1) >> inode->i_blkbits;
- handle = fsfilt_ext3_journal_start(inode,
+ handle = ext3_journal_start(inode,
block_count * FSFILT_DATA_TRANS_BLOCKS(inode->i_sb) + 2);
if (IS_ERR(handle)) {
CERROR("can't start transaction for %d blocks (%d bytes)\n",
if (!err && force_sync)
handle->h_sync = 1; /* recovery likes this */
- fsfilt_ext3_journal_stop(handle);
+ ext3_journal_stop(handle);
return err;
}