]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
libext2fs: fix unaligned, multiblock writes in the unix_io handler
authorTheodore Ts'o <tytso@mit.edu>
Sun, 11 Sep 2016 04:25:48 +0000 (00:25 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 11 Sep 2016 04:25:48 +0000 (00:25 -0400)
The read-modify-write code for the unaligned fallback code wasn't
working for multi-block writes.  This was unmasked by FreeBSD 11-rc2,
since its malloc() is returning unaligned memory regions for large
memory regions.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/unix_io.c

index 018d2ca933d5462747bb2c5b8eaf1e7a282865b7..eee556651b0502f2ba9cb81e03f939bb46e771c5 100644 (file)
@@ -300,6 +300,7 @@ static errcode_t raw_write_blk(io_channel channel,
                        goto short_write;
                size -= actual;
                buf += actual;
+               location += actual;
        }
        return 0;