Add ext4_fix_printk_checkpatch_issues
[ext4-patch-queue.git] / defrag-relocate-file-data-credits
blob881e8afa9f254d21d145d4649572a20cb5f170d6
1 This patch should be merged with ext4-online-defrag-relocate-file-data.patch
3 It originally came from ext4_journal_credits_fix_for_writepages.patch,
4 but was split off when this patch was moved into the stable part of
5 the patch queue.
7 Cc: Akira Fujita <a-fujita@rs.jp.nec.com>
8 Cc: Takashi Sato <t-sato@yk.jp.nec.com>
9 Signed-off-by: Mingming Cao <cmm@us.ibm.com>
10 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
11 ---
13 Index: linux-2.6.26-git6/fs/ext4/defrag.c
14 ===================================================================
15 --- linux-2.6.26-git6.orig/fs/ext4/defrag.c     2008-07-25 17:39:23.000000000 -0700
16 +++ linux-2.6.26-git6/fs/ext4/defrag.c  2008-07-25 17:39:52.000000000 -0700
17 @@ -1494,7 +1495,7 @@ ext4_defrag_partial(struct inode *tmp_in
18          * It needs twice the amount of ordinary journal buffers because
19          * inode and tmp_inode may change each different metadata blocks.
20          */
21 -       jblocks = ext4_writepage_trans_blocks(org_inode) * 2;
22 +       jblocks = ext4_writepages_trans_blocks(org_inode, 1) * 2;
23         handle = ext4_journal_start(org_inode, jblocks);
24         if (IS_ERR(handle)) {
25                 ret = PTR_ERR(handle);