metadata: Put io before callback invocation
This allows for safe volume destruction in callback function. Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
parent
0412e05260
commit
c263e3e9eb
@ -168,12 +168,12 @@ static void ocf_metadata_read_sb_complete(struct ocf_io *io, int error)
|
|||||||
sizeof(context->superblock));
|
sizeof(context->superblock));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ctx_data_free(context->ctx, data);
|
||||||
|
ocf_io_put(io);
|
||||||
|
|
||||||
context->error = error;
|
context->error = error;
|
||||||
context->cmpl(context);
|
context->cmpl(context);
|
||||||
|
|
||||||
ctx_data_free(context->ctx, data);
|
|
||||||
ocf_io_put(io);
|
|
||||||
env_free(context);
|
env_free(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user