mirror of
https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
synced 2024-12-12 11:23:32 +08:00
resize2fs: fix inode table move for the backwards move case
In the case where the new location of the inode table is before the old inode table, the optimization which tries to optimize zero block moves breaks. Fix it. This fixes a bug that was tickled by the reproduction described in the previous commit. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
parent
d51072af0a
commit
cd84e9a337
@ -1869,6 +1869,8 @@ static errcode_t move_itables(ext2_resize_t rfs)
|
||||
|
||||
if (!diff)
|
||||
continue;
|
||||
if (diff < 0)
|
||||
diff = 0;
|
||||
|
||||
retval = io_channel_read_blk64(fs->io, old_blk,
|
||||
fs->inode_blocks_per_group,
|
||||
|
Loading…
Reference in New Issue
Block a user