sb->crc = 0;
sb->crc = cpu_to_le32(crc32_le(sb_gen, (unsigned char *)sb, DMZ_BLOCK_SIZE));
- ret = dmz_rdwr_block(zmd, REQ_OP_WRITE, block, mblk->page);
+ ret = dmz_rdwr_block(dev, REQ_OP_WRITE, zmd->sb[set].block,
+ mblk->page);
if (ret == 0)
- ret = blkdev_issue_flush(zmd->dev->bdev, GFP_NOIO);
- ret = blkdev_issue_flush(dev->bdev, GFP_NOIO, NULL);
++ ret = blkdev_issue_flush(dev->bdev, GFP_NOIO);
return ret;
}
/* Flush drive cache (this will also sync data) */
if (ret == 0)
- ret = blkdev_issue_flush(zmd->dev->bdev, GFP_NOIO);
- ret = blkdev_issue_flush(dev->bdev, GFP_NOIO, NULL);
++ ret = blkdev_issue_flush(dev->bdev, GFP_NOIO);
return ret;
}
/* If there are no dirty metadata blocks, just flush the device cache */
if (list_empty(&write_list)) {
- ret = blkdev_issue_flush(zmd->dev->bdev, GFP_NOIO);
- ret = blkdev_issue_flush(dev->bdev, GFP_NOIO, NULL);
++ ret = blkdev_issue_flush(dev->bdev, GFP_NOIO);
goto err;
}