]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
e2fsck: use ext2fs_get_mem() instad of ext2fs_get_memalign()
authorTheodore Ts'o <tytso@mit.edu>
Fri, 19 Sep 2014 05:30:04 +0000 (01:30 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 19 Sep 2014 05:30:04 +0000 (01:30 -0400)
There is no reason to request a aligned buffer in
check_{inode,block}_bitmap, and this will cause failures for dietlibc,
which doesn't have support for posix_memalign() or any other way to
request an aligned memory allocation.  Fortunately, this is only
needed in very few places where direct I/O is required.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2fsck/pass5.c

index 86ac9fd9a7a36afe773b53360d165061a62a2799..8d6032bbfa9b83505db63ad73f333f6a2b28eced 100644 (file)
@@ -99,8 +99,7 @@ static void check_inode_bitmap_checksum(e2fsck_t ctx)
                return;
 
        nbytes = (size_t)(EXT2_INODES_PER_GROUP(ctx->fs->super) / 8);
-       retval = ext2fs_get_memalign(ctx->fs->blocksize, ctx->fs->blocksize,
-                                    &buf);
+       retval = ext2fs_get_mem(ctx->fs->blocksize, &buf);
        if (retval) {
                com_err(ctx->program_name, 0, "%s",
                    _("check_inode_bitmap_checksum: Memory allocation error"));
@@ -155,8 +154,7 @@ static void check_block_bitmap_checksum(e2fsck_t ctx)
                return;
 
        nbytes = (size_t)(EXT2_CLUSTERS_PER_GROUP(ctx->fs->super) / 8);
-       retval = ext2fs_get_memalign(ctx->fs->blocksize, ctx->fs->blocksize,
-                                    &buf);
+       retval = ext2fs_get_mem(ctx->fs->blocksize, &buf);
        if (retval) {
                com_err(ctx->program_name, 0, "%s",
                    _("check_block_bitmap_checksum: Memory allocation error"));