]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/md/dm-log-writes.c
Merge branch 'acpi-tables'
[linux.git] / drivers / md / dm-log-writes.c
index e549392e0ea517a55ec672a95a909a8082d19414..99721c76225d832e8de333a722c6a0ab78ab7a48 100644 (file)
@@ -40,7 +40,7 @@
  *
  * Would result in the log looking like this:
  *
- * c,a,flush,fuad,b,<other writes>,<next flush>
+ * c,a,b,flush,fuad,<other writes>,<next flush>
  *
  * This is meant to help expose problems where file systems do not properly wait
  * on data being written before invoking a FLUSH.  FUA bypasses cache so once it
@@ -699,7 +699,7 @@ static int log_writes_map(struct dm_target *ti, struct bio *bio)
        if (discard_bio)
                alloc_size = sizeof(struct pending_block);
        else
-               alloc_size = sizeof(struct pending_block) + sizeof(struct bio_vec) * bio_segments(bio);
+               alloc_size = struct_size(block, vecs, bio_segments(bio));
 
        block = kzalloc(alloc_size, GFP_NOIO);
        if (!block) {