Merge pull request #249 from micrakow/atomic_fix

atomic: move setting up context before sub io allocation
This commit is contained in:
Adam Rutkowski 2019-12-23 17:48:19 +01:00 committed by GitHub
commit d836a054a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1098,7 +1098,7 @@ void cas_atomic_submit_write_zeroes(struct ocf_io *io)
}
ctx->sub_io = ocf_volume_new_io(ocf_io_get_volume(io), io->io_queue,
io->addr, min(io->bytes, ctx->step_size),
io->addr, min(io->bytes, step_size),
OCF_WRITE, 0, 0);
if (!ctx->sub_io) {
result = -ENOMEM;