mirror of
https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
synced 2024-11-28 04:23:45 +08:00
resize2fs: fix sanity check in reserve_sparse_super2_last_group()
In reserve_sparse_super2_last_group, the old_desc check should only be performed if ext2fs_super_and_bgd_loc2() gave us a location -- a return value of 0 means that there is no old-style GDT block. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
parent
1c358e6e12
commit
1244cacc70
@ -2047,7 +2047,7 @@ static errcode_t reserve_sparse_super2_last_group(ext2_resize_t rfs,
|
||||
stderr);
|
||||
exit(1);
|
||||
}
|
||||
if (old_desc != sb+1) {
|
||||
if (old_desc && old_desc != sb+1) {
|
||||
fputs(_("Should never happen! Unexpected old_desc in "
|
||||
"super_sparse bg?\n"),
|
||||
stderr);
|
||||
|
Loading…
Reference in New Issue
Block a user