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

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);
}