]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] (5/5) ext2_free_blocks() cleanup
authorAlexander Viro <viro@math.psu.edu>
Sat, 9 Feb 2002 03:17:09 +0000 (19:17 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Sat, 9 Feb 2002 03:17:09 +0000 (19:17 -0800)
minor cleanup: update 'freed' only after we finish with group

fs/ext2/balloc.c

index 45c014e5017e767cb639ee4b57c374bd9fbf011d..4875298196212a5798cc5f118048af834741add4 100644 (file)
@@ -232,7 +232,7 @@ do_more:
        bh = load_block_bitmap (sb, block_group);
        if (IS_ERR(bh))
                goto error_return;
-       
+
        gdp = ext2_get_group_desc (sb, block_group, &bh2);
        if (!gdp)
                goto error_return;
@@ -253,10 +253,8 @@ do_more:
                        ext2_error (sb, "ext2_free_blocks",
                                      "bit already cleared for block %lu",
                                      block + i);
-               else {
+               else
                        group_freed++;
-                       freed++;
-               }
        }
 
        mark_buffer_dirty(bh);
@@ -266,6 +264,8 @@ do_more:
        }
 
        group_release_blocks(gdp, bh2, group_freed);
+       freed += group_freed;
+
        if (overflow) {
                block += count;
                count = overflow;