]> git.ipfire.org Git - thirdparty/e2fsprogs.git/blobdiff - lib/ext2fs/expanddir.c
libext2fs: don't update the summary counts when doing implied cluster allocation
[thirdparty/e2fsprogs.git] / lib / ext2fs / expanddir.c
index 41c40882f6e3769a3d61f22bafbf35aa8ec5cc2e..153b838c11db4e9f3d8ef89eb909f993b8d03c6f 100644 (file)
@@ -54,6 +54,7 @@ static int expand_dir_proc(ext2_filsys        fs,
                        return BLOCK_ABORT;
                }
                es->newblocks++;
+               ext2fs_block_alloc_stats2(fs, new_blk, +1);
        }
        if (blockcnt > 0) {
                retval = ext2fs_new_dir_block(fs, 0, 0, &block);
@@ -80,7 +81,6 @@ static int expand_dir_proc(ext2_filsys        fs,
        }
        ext2fs_free_mem(&block);
        *blocknr = new_blk;
-       ext2fs_block_alloc_stats2(fs, new_blk, +1);
 
        if (es->done)
                return (BLOCK_CHANGED | BLOCK_ABORT);