Whamcloud - gitweb
debugfs: fix range mode of freei
authorLev Solomonov <solo@primarydata.com>
Thu, 5 Dec 2013 02:55:22 +0000 (21:55 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 5 Dec 2013 02:55:27 +0000 (21:55 -0500)
commit 2ae5d1fdb82b31bf270c4699c59a087c846db2f0 was supposed to teach
'seti' and 'freei' to act on a range of consecutive inodes. apparently
only 'seti' has learned: 'freei' doesn't advance the ino, repeatedly
acting on the same one instead.

Signed-off-by: Lev Solomonov <solo@primarydata.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
debugfs/debugfs.c

index b2406c7..1fc76a0 100644 (file)
@@ -1030,7 +1030,7 @@ void do_freei(int argc, char *argv[])
            !ext2fs_test_inode_bitmap2(current_fs->inode_map,inode))
                com_err(argv[0], 0, "Warning: inode already clear");
        while (len-- > 0)
-               ext2fs_unmark_inode_bitmap2(current_fs->inode_map, inode);
+               ext2fs_unmark_inode_bitmap2(current_fs->inode_map, inode++);
        ext2fs_mark_ib_dirty(current_fs);
 }