Merge pull request #153 from robertbaldyga/put-io-before-callback

metadata: Put io before callback invocation
This commit is contained in:
Jan Musiał 2019-05-14 13:53:33 +02:00 committed by GitHub
commit a9d07917a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -168,12 +168,12 @@ static void ocf_metadata_read_sb_complete(struct ocf_io *io, int error)
sizeof(context->superblock));
}
ctx_data_free(context->ctx, data);
ocf_io_put(io);
context->error = error;
context->cmpl(context);
ctx_data_free(context->ctx, data);
ocf_io_put(io);
env_free(context);
}