]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/ext4/migrate.c
ext4: journal credits reservation fixes for extent file writepage
[linux-2.6-omap-h63xx.git] / fs / ext4 / migrate.c
index b9e077ba07e94b0c979ebea4530e1fc9471e6eee..46fc0b5b12bab540cf00bb1ffb7fcec1b51854fa 100644 (file)
@@ -53,7 +53,8 @@ static int finish_range(handle_t *handle, struct inode *inode,
         * credit. But below we try to not accumalate too much
         * of them by restarting the journal.
         */
-       needed = ext4_ext_calc_credits_for_insert(inode, path);
+       needed = ext4_ext_calc_credits_for_single_extent(inode,
+                   lb->last_block - lb->first_block + 1, path);
 
        /*
         * Make sure the credit we accumalated is not really high